Make this dialog msgbox
#8

pawn Код:
CMD:_afklist(playerid)
{
        new count = 0, name[MAX_PLAYER_NAME], string[1024];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
           if (IsPlayerConnected(i)) if(IsAFK[i]) count++;
        }

        if(count < 1) ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "ERROR", "There are no afk or brb players.", "Close", "");
        else if(count > 0)
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(IsAFK[i])
                    {
                        GetPlayerName(i, name, sizeof(name));
                        format(string, sizeof(string), "%s%d\t\t%s", string, i, name);
                    }
                }
            }
            strins(string, "ID\t\tName\n \n", 0);
        }
        if(strlen(string) < 1024) ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "AFK List", string, "Close", "");
        return 1;
}
I'm sorry about being soo blind. Anyway thats what you wanted.
Reply


Messages In This Thread
Make this dialog msgbox - by kbalor - 21.09.2012, 18:38
Re: Make this dialog msgbox - by Cypress - 21.09.2012, 19:31
Re: Make this dialog msgbox - by kbalor - 21.09.2012, 19:48
Re: Make this dialog msgbox - by Cypress - 21.09.2012, 19:57
Re: Make this dialog msgbox - by kbalor - 21.09.2012, 20:03
Re: Make this dialog msgbox - by Cypress - 21.09.2012, 20:19
Re: Make this dialog msgbox - by kbalor - 21.09.2012, 20:34
Re: Make this dialog msgbox - by Cypress - 21.09.2012, 23:43

Forum Jump:


Users browsing this thread: 1 Guest(s)