13.12.2015, 16:57
Hello.
I have a situation with my function for admin system. So i made GetPlayerAdminRank(playerid); to get player's admin rank if he's admin. The real problem is:
- When i set player's administration level to lets say '5' (owner,which should work) it doesn't. But when i set '4' it sets the owner level. Is the problem that the numbers are counted from 0 to 4? If yes how can i fix it?
CODE:
Sorry for my bad English! 
Thanks for support.
I have a situation with my function for admin system. So i made GetPlayerAdminRank(playerid); to get player's admin rank if he's admin. The real problem is:
- When i set player's administration level to lets say '5' (owner,which should work) it doesn't. But when i set '4' it sets the owner level. Is the problem that the numbers are counted from 0 to 4? If yes how can i fix it?
CODE:
PHP код:
stock GetPlayerAdminRank(playerid)
{
new level[64];
switch (PlayerInfo[playerid][pAdministrator])
{
case 1: level = "{FF0000}Admin I{FFFFFF}";
case 2: level = "{FF0000}Admin II{FFFFFF}";
case 3: level = "{FF0000}Admin III{FFFFFF}";
case 4: level = "{FF0000}Direktor{FFFFFF}";
case 5: level = "{FF0000}Vlasnik{FFFFFF}";
}
return level;
}

Thanks for support.