03.04.2011, 16:53
When player does /admins while admins are online, it says for example "Tan_Momochi[AX] (Server Owner)" then under it shows "No Admins are connected in the server."
pawn Код:
CMD:admins(playerid, params[])
{
for(new i = 0; i < 10; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerData[i][AdminLevel] != 0)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(i,name,MAX_PLAYER_NAME);
if(PlayerData[i][AdminLevel] == 1) format(string, sizeof(string), "%s level 1 (Server Moderator)",name,PlayerData[playerid][AdminLevel]);
if(PlayerData[i][AdminLevel] == 2) format(string, sizeof(string), "%s level 2 (Global Moderator)",name,PlayerData[playerid][AdminLevel]);
if(PlayerData[i][AdminLevel] == 3) format(string, sizeof(string), "%s level 3 (Administrator)",name,PlayerData[playerid][AdminLevel]);
if(PlayerData[i][AdminLevel] == 4) format(string, sizeof(string), "%s level 4 (Server Owner)",name,PlayerData[playerid][AdminLevel]);
SendClientMessage(playerid,0xFF9900AA,string);
}
}
else return SendClientMessage(playerid,0xFF0000FF,"No Admins are connected in the server.");
}
return 1;
}