/admins dialog command error.
#1

pawn Код:
dcmd_admins(playerid, params[])
{
    #pragma unused params
    foreach(Player, i)
    {
        new level[128], string[128], name[MAX_PLAYER_NAME];
        GetPlayerName(i, name, sizeof(name));

        if(PlayerInfo[i][pAdmin] > 0)
        {
            switch(PlayerInfo[i][pAdmin])
            {
                case 1: level = "Trial Admin";
                case 2: level = "Moderator";
                case 3: level = "Basic Moderator";
                case 4: level = "Head Moderator";
                case 5: level = "Administrator";
                case 6: level = "Head Admin";
                case 7: level = "Lead Admin";
                case 8: level = "Develepor";
                case 9: level = "Co-Owner";
                case 10: level = "Owner";
            }
            format(string, sizeof(string), "%s - %s Level %d\n", name, level, PlayerInfo[i][pAdmin]);
            ShowPlayerDialog(playerid, 78, DIALOG_STYLE_MSGBOX, "{00FF00}Online Admins", string, "Close", "");
            return 1;
        }
        else ShowPlayerDialog(playerid,78,DIALOG_STYLE_MSGBOX,"{00FF00}Online Admins","No Admin Online","Done","");
    }
    return 1;
}
It only shows 1 admin online even if there are more admins online.
Reply


Messages In This Thread
/admins dialog command error. - by iSkate - 30.06.2014, 17:56
Re : /admins dialog command error. - by Clad - 30.06.2014, 18:02
Re: /admins dialog command error. - by Konstantinos - 30.06.2014, 18:32

Forum Jump:


Users browsing this thread: 2 Guest(s)