07.01.2013, 15:25
Hello guys, I have some problem.
I know the code bellow i can write in switch, but i don't know how...
Greetings, micol.
I know the code bellow i can write in switch, but i don't know how...
Код:
new string[128], Nick[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nick, sizeof(Nick)); if(Player[playerid][pAdminLevel] == 3) { format(string, sizeof(string), "(Junior Admin ID:%d): %s",playerid, text); SendPlayerMessageToAll(playerid, string); } if(Player[playerid][pAdminLevel] == 4) { format(string, sizeof(string), "(Admin ID:%d): %s",playerid, text); SendPlayerMessageToAll(playerid, string); } if(Player[playerid][pAdminLevel] == 5) { format(string,sizeof(string), "(Head Admin ID:%d): %s", playerid, text); SendPlayerMessageToAll(playerid, string); } else { format(string, sizeof(string), "(ID:%d): %s", playerid, text); SendPlayerMessageToAll(playerid, string); }