Add to Admin List upon connect
#3

You should use foreach like this
pawn Код:
CMD:admins(playerid,params[])
{
    foreach(Player, i)
    {
        new level[128],status[200], string[128];

        if(PlayerInfo[i][pAdmin] >= 1)
        {
            switch(PlayerInfo[i][pAdmin])
            {
                case 1: level = "[Trial Staff Member] ";
                case 2: level = "[Junior Moderator] ";
                case 3: level = "[Moderator] ";
                case 4: level = "[Junior Admin] ";
                case 5: level = "[Lead Admin] ";
                case 6: level = "[Community Co-Owner] ";
                case 7: level = "[Community Owner] ";
            }
            // Other if ststement removed to stop copying of my main code
            format(string, sizeof(string), "%s %s\n", level, GetName(i));
            ShowPlayerDialog(playerid, DIALOG_ONLINE_ADMINS, DIALOG_STYLE_LIST, "Online Staff", string, "Close", "");
        }
        else{
        ShowPlayerDialog(playerid, DIALOG_ONLINE_ADMINS, DIALOG_STYLE_LIST, "Online Staff", "[SERVER] Anti-Cheat Is: Administrating", "Close", "");
        }
    }
    return 1;
}
PS, Code updated this is the one i made for my server
Reply


Messages In This Thread
Add to Admin List upon connect - by Joshman543 - 08.10.2012, 23:31
Re: Add to Admin List upon connect - by ikbenremco - 09.10.2012, 05:09
Re: Add to Admin List upon connect - by zT KiNgKoNg - 09.10.2012, 10:02

Forum Jump:


Users browsing this thread: 1 Guest(s)