/admins dialog help
#2

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.
Код:
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;
}
Btw, this will again not work because you need to use fomat and strcat to add all players to the string.
Reply


Messages In This Thread
/admins dialog help - by JawsPlus - 08.11.2014, 09:30
Re: /admins dialog help - by dominik523 - 08.11.2014, 09:59
Re: /admins dialog help - by JawsPlus - 08.11.2014, 11:48
Re: /admins dialog help - by Diverse - 08.11.2014, 11:54
Re: /admins dialog help - by biker122 - 08.11.2014, 11:57
Re: /admins dialog help - by dominik523 - 08.11.2014, 12:04
Re: /admins dialog help - by biker122 - 08.11.2014, 12:33
Re: /admins dialog help - by JawsPlus - 08.11.2014, 12:35

Forum Jump:


Users browsing this thread: 1 Guest(s)