PHP код:
CMD:admins(playerid)
{
new count=0, PlayerName[MAX_PLAYER_NAME], rankname[32],color[100];
new list1[256];
strcat(list1, "{FFFFFF}NO\t{FFFFFF}Name(ID)\t{FFFFFF}Level\n");
foreach(Player, i)
{
if(!playerData[i][playerLevel])
continue;
count++;
GetPlayerName(i, PlayerName, sizeof(PlayerName));
color = ((playerData[i][playerAdminDuty])?("{FF0770}"):("{C0C0C0}"));
format(list1, sizeof(list1), "%s\n%d\t%s%s(%d)\t{FFFFFF}LEVEL %i\n", list1, count + 1,color, PlayerName, i, playerData[i][playerLevel]);
}
if(!count)
{
SendClientMessage(playerid, -1, "There are no administrators online.");
}
else
{
ShowPlayerDialog(playerid, 555, DIALOG_STYLE_TABLIST_HEADERS, "Online Admins",list1, "Close", "");
}
return 1;
}