#1

Hi I Have A Rank System And Her's My Code

PHP код:
new iScore GetPlayerScore(playerid);
    switch(
iScore)
    {
        case 
0..100:
        {
            
pRank[playerid] = RANK_NEWBIE;
               new 
string2[41];
            
format(string2sizeof(string2), "Rank: Newbie");
            
TextDrawSetString(Textdraw3string2);
        }
        case 
101..200:
        {
            
pRank[playerid] = RANK_PROFESSIONAL;
               new 
string2[41];
            
format(string2sizeof(string2), "Rank: Professional");
            
TextDrawSetString(Textdraw3string2);
        }
        case 
201..300:
        {
            
pRank[playerid] = RANK_ASSASINATOR;
               new 
string2[41];
            
format(string2sizeof(string2), "Rank: Assasinator");
            
TextDrawSetString(Textdraw3string2);
        }
        case 
301..400:
        {
            
pRank[playerid] = RANK_HITMAN;
               new 
string2[41];
            
format(string2sizeof(string2), "Rank: Hitman");
            
TextDrawSetString(Textdraw3string2);
        }
        case 
401..9999:
        {
            
pRank[playerid] = RANK_SILENTASSASINATOR;
               new 
string2[41];
            
format(string2sizeof(string2), "Rank: SilentAssasinator");
            
TextDrawSetString(Textdraw3string2);
        }
    } 
And How Can I Make The Rank Silentassasinator If The Player Has Higher Than Score 401?
Reply
#2

This might help you.
pawn Код:
if(GetPlayerScore(playerid) >401)
Reply
#3

pawn Код:
new iScore = GetPlayerScore(playerid);
    switch(iScore)
    {
        case 0..100:
        {
            pRank[playerid] = RANK_NEWBIE;
               new string2[41];
            format(string2, sizeof(string2), "Rank: Newbie");
            TextDrawSetString(Textdraw3, string2);
        }
        case 101..200:
        {
            pRank[playerid] = RANK_PROFESSIONAL;
               new string2[41];
            format(string2, sizeof(string2), "Rank: Professional");
            TextDrawSetString(Textdraw3, string2);
        }
        case 201..300:
        {
            pRank[playerid] = RANK_ASSASINATOR;
               new string2[41];
            format(string2, sizeof(string2), "Rank: Assasinator");
            TextDrawSetString(Textdraw3, string2);
        }
        case 301..400:
        {
            pRank[playerid] = RANK_HITMAN;
               new string2[41];
            format(string2, sizeof(string2), "Rank: Hitman");
            TextDrawSetString(Textdraw3, string2);
        }
        case 401..9999: // change the 401 to what ever you want
        {
            pRank[playerid] = RANK_SILENTASSASINATOR;
               new string2[41];
            format(string2, sizeof(string2), "Rank: SilentAssasinator");
            TextDrawSetString(Textdraw3, string2);
        }
    }
Reply
#4

Your code is look right, when the player have score more than 401 to 9999 they are SilentAssasinator.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)