07.01.2013, 15:38
pawn Код:
new string[128], Nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nick, sizeof(Nick));
switch(Player[playerid][pAdminLevel])
{
case 3: //If Player[playerid][pAdminLevel] equals to 3.
{
format(string, sizeof(string), "(Junior Admin ID:%d): %s",playerid, text);
SendPlayerMessageToAll(playerid, string);
}
case 4: //If Player[playerid][pAdminLevel] equals to 4.
{
format(string, sizeof(string), "(Admin ID:%d): %s",playerid, text);
SendPlayerMessageToAll(playerid, string);
}
case 5: //If Player[playerid][pAdminLevel] equals to 5.
{
format(string,sizeof(string), "(Head Admin ID:%d): %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
}
default: //If all of the cases above are false.
{
format(string, sizeof(string), "(ID:%d): %s", playerid, text);
SendPlayerMessageToAll(playerid, string);
}
}