/admins isn't working right
#5

format the string inside the loop then show the dialog outside the loop, like this;

pawn Код:
CMD:admins(playerid, params[])
{
    foreach(Player, i)
    {
        new string[256], name[MAX_PLAYER_NAME];
        GetPlayerName(i, name, sizeof(name));

        if(pInfo[i][Adminlevel ] > 0)
        {
            format(string, sizeof(string), "%s%s %s\n", string, AdminLevelName(playerid), name);
        }
    }
    ShowPlayerDialog(playerid, DIALOG_ONLINE_ADMINS, DIALOG_STYLE_MSGBOX, "Admins online", string, "Close", "");
    return 1;
}
Reply


Messages In This Thread
/admins isn't working right - by LeXuZ - 26.11.2014, 19:05
Re : /admins isn't working right - by AYOUYOU - 26.11.2014, 19:21
Re: /admins isn't working right - by LeXuZ - 26.11.2014, 19:29
Re: /admins isn't working right - by AnthonyTimmers - 26.11.2014, 20:37
Re: /admins isn't working right - by Luis- - 26.11.2014, 20:40
Re: /admins isn't working right - by AnthonyTimmers - 26.11.2014, 20:45
Re: /admins isn't working right - by Luis- - 26.11.2014, 20:49
Re: /admins isn't working right - by AnthonyTimmers - 26.11.2014, 20:56
Re: /admins isn't working right - by Luis- - 26.11.2014, 20:58
Re: /admins isn't working right - by LeXuZ - 27.11.2014, 16:18

Forum Jump:


Users browsing this thread: 1 Guest(s)