Hey dialog help
#4

Meh, had a bug anyway.

This is fixed now:

pawn Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params
    new Admins, string[2048];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][Level]>0)
            {
                Admins++;
            }
        }
    }
    if(Admins<=0) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Admins:","No Administrators online.","Okay","Cancel");
    if(Admins==1) format(string, sizeof(string), "Administrator online:\n");
    if(Admins>1) format(string, sizeof(string), "Administrators online:  (%d)\n",Admins);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][Level]>0)
            {
                format(string,sizeof(string),"%s\n%s (ID:%d) (Level: %d)",string, PlayerName2(i),i,PlayerInfo[i][Level]);
            }
        }
    }
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Admins:",string,"Okay","Cancel");
    return 1;
}
Check it out. ^^
Reply


Messages In This Thread
Hey dialog help - by Mr.Jvxmc - 31.10.2010, 19:17
Re: Hey dialog help - by Jeffry - 31.10.2010, 19:50
Re: Hey dialog help - by Mr.Jvxmc - 31.10.2010, 19:57
Re: Hey dialog help - by Jeffry - 31.10.2010, 20:04
Re: Hey dialog help - by Mr.Jvxmc - 31.10.2010, 20:19
Re: Hey dialog help - by Jeffry - 31.10.2010, 20:27
Re: Hey dialog help - by Mr.Jvxmc - 31.10.2010, 20:31
Re: Hey dialog help - by Jeffry - 31.10.2010, 20:49
Re: Hey dialog help - by Mr.Jvxmc - 31.10.2010, 20:57
Re: Hey dialog help - by Jeffry - 31.10.2010, 20:59
Re: Hey dialog help - by Mr.Jvxmc - 31.10.2010, 21:05
Re: Hey dialog help - by Jeffry - 31.10.2010, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)