09.11.2013, 11:56
Should work I believe, haven't tested though.
pawn Код:
CMD:admins(playerid, params[])
{
new Count[2], fdialog[124 * 2], formatx[124];
for(new i = 1; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerInfo[i][AdminLevel] > 0) Count[0]++;
if(IsPlayerAdmin(i)) Count[1]++;
format(formatx, sizeof(formatx), "%s(%d) [AdminLevel: %d]\n", GetName(i), i, PlayerInfo[i][AdminLevel]);
strcat(fdialog, formatx);
}
if(!Count[0] && !Count[1]) return SendClientMessage(playerid, -1, "There are no admins online");
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_LIST, "Administrators", fdialog, "Confirm", "Cancel");
return 1;
}