Scripting help.
#2

Example:
pawn Код:
stock AdminRank(playerid)
{
    if(pInfo[PlayerInfo][pAdmin] >= 1)
    {
        new arank[32];
        if(PlayerInfo[playerid][Rank] == 1) format(pdrank, sizeof(pdrank), "Level 1");
        else if(PlayerInfo[playerid][pAdmin] == 2) format(pdrank, sizeof(pdrank), "Level 2");
        else if(PlayerInfo[playerid][pAdmin] == 3) format(pdrank, sizeof(pdrank), "Level 3");
        else if(PlayerInfo[playerid][pAdmin] == 4) format(pdrank, sizeof(pdrank), "Level 4");
        else if(PlayerInfo[playerid][pAdmin] == 5) format(pdrank, sizeof(pdrank), "Level 5");
        else if(PlayerInfo[playerid][pAdmin] == 6) format(pdrank, sizeof(pdrank), "Level 6");
        else if(PlayerInfo[playerid][pAdmin] == 7) format(pdrank, sizeof(pdrank), "Level 7");
        else if(PlayerInfo[playerid][pAdmin] == 8) format(pdrank, sizeof(pdrank), "Level 8");
        else if(PlayerInfo[playerid][pAdmin] == 9) format(pdrank, sizeof(pdrank), "Level 9");
        else if(PlayerInfo[playerid][pAdmin] == 10) format(pdrank, sizeof(pdrank), "Level 10");
    }
    return arank;
}
// USAGE
new str[128];
format(str,sizeof(str),"My Rank: %s",AdminRank(playerid));
Reply


Messages In This Thread
Scripting help. - by Adrick - 21.01.2013, 12:50
Re: Scripting help. - by Infinity90 - 21.01.2013, 12:55
Re: Scripting help. - by Adrick - 21.01.2013, 13:36
Re: Scripting help. - by Infinity90 - 21.01.2013, 13:40
Re: Scripting help. - by Djole1337 - 21.01.2013, 13:42
Re: Scripting help. - by Adrick - 21.01.2013, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)