21.01.2013, 12:55
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));