24.11.2012, 20:12
PHP код:
if (strcmp(cmd, "/admins", true) == 0)
{
new count = 0,text[256];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccountInfo[i][AdminLevel] >= 1 && AccountInfo[i][AdminLevel] <= 5 && Hide[i] == 0)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(i, playername, sizeof(playername));
format(string, 64, "%s | Level: %d\n",playername, AccountInfo[i[AdminLevel]);
strcat(text,string);
count++;
}
}
}
if (count == 0) SendClientMessage(playerid,LILA,"Server: No Admins online yet.");
ShowPlayerDialog(playerid,2563,DIALOG_STYLE_LIST,"Admins Online:"text,"OK","");
return true;
}