Quote:
Originally Posted by TheToretto
PHP код:
ReturnAdminLevel(playerid)
{
new
string[64]
;
switch (PlayerInfo[playerid][pAdmin])
{
case 1: string= "Moderator";
case 2: string= "Game Administrator";
case 3: string= "Lead Administrator";
case 4: string= "Server Manager";
default: string= "Undefined";
}
return string;
}
Then to use it here's an example:
PHP код:
SendClientMessageEx(playerid, COLOR_LAWNGREEN, "%s has just promoted you to %s",ReturnName(playerid), ReturnAdminLevel(id));
|
I mean when I do /makeadmin 0 4, it displays first case 2 and then the correct one. Same thing if I choose case 4 and then case 3, it displays first case 4 and then the correct one which is case 3.