08.11.2014, 09:59
It shows only one person because you are showing the dialog after you find the first person. You need to show it after getting all the players.
Btw, this will again not work because you need to use fomat and strcat to add all players to the string.
Код:
dcmd_admins(playerid,params[]) { #pragma unused params new count=0,string[128],rank[128]; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && GetInfo(i,"AdminLevel")>= 1) { format(string, 128, "{FF02A7}%s {ffffff}Level: %d", AdminName(i),GetInfo(i,"AdminLevel")); count++; } } if(count) ShowPlayerDialog(playerid, 5559, DIALOG_STYLE_MSGBOX, "Online administrator", string, "Close", ""); if (count == 0) SendClientMessage(playerid,LIGHTBLUE,"{FF02A7}[Admin]:{ffffff}There Are no Admins Online"); return 1; }