Help me Put / admins in Dialog?
#2

pawn Код:
if(!strcmp(cmdtext, "/admins", true))
{
    new count=0;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(admin[i])
            {
                new str[256];
                new pname[24];
                GetPlayerName(i, pname, 24);
                format(file2, sizeof(file2), PASTA_CONTAS, pname);
                if(pAdmin[i] == 1)
                {
                    format(str,sizeof(str),"%s %s (%d) :: [Tutor]\r\n",str, pname,i);
                }
                if(pAdmin[i] == 2)
                {
                    format(str,sizeof(str),"%s %s (%d) :: [Administrador]\r\n",str, pname,i);
                }
                if(pAdmin[i] == 3)
                {
                    format(str,sizeof(str),"%s %s (%d) :: [Administrador Senior]\r\n",str, pname,i);
                }
                if(pAdmin[i] == 4)
                {
                    format(str,sizeof(str),"%s %s (%d) :: [Sub-Dono]\r\n",str, pname,i);
                }
                if(pAdmin[i] == 5)
                {
                    format(str,sizeof(str),"%s %s (%d) :: [Dono]\r\n",str, pname,i);
                }
                ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Admins:", str, "Close", "");
                count++;
            }
        }
    }
    if(count == 0)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Admins:", "(ERRO) Nгo hб administradores online no momento", "Close", "");
    }
    return 1;
}
Not tested!
Reply


Messages In This Thread
Help me Put / admins in Dialog? - by xRuffles - 17.02.2013, 14:12
Re: Help me Put / admins in Dialog? - by ]Rafaellos[ - 17.02.2013, 14:19
Re: Help me Put / admins in Dialog? - by xRuffles - 17.02.2013, 14:30
Re: Help me Put / admins in Dialog? - by xRuffles - 17.02.2013, 15:50
Re: Help me Put / admins in Dialog? - by xRuffles - 17.02.2013, 16:09
Re: Help me Put / admins in Dialog? - by xRuffles - 18.02.2013, 09:18

Forum Jump:


Users browsing this thread: 1 Guest(s)