/staff command problem
#2

pawn Код:
YCMD:staff(playerid, params[], help)
{
    #pragma unused params
    if(help) return SCM(playerid, COLOR_GREY, "Not supported");
    SCM(playerid, COLOR_YELLOW, "Admins");
    new pName[MAX_PLAYER_NAME];
    foreach(new i : Player)
    {
        if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 6)
        {
            new admtext[14];
            if(PlayerInfo[i][pAppearList] == 1 || PlayerInfo[i][pAppearList] == 0)
            {
                format(admtext, sizeof admtext, "Admin level %d", PlayerInfo[playerid][pAdmin]);
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "%s: %s %s", admtext, pName, (PlayerInfo[i][pAdminDuty] ? ("- On Duty") : ("")));
                SCM(playerid, COLOR_GRAD, string);
            }
        }
    }
    SCM(playerid, COLOR_YELLOW, "Mods");
    foreach(new i : Player)
    {
        if(PlayerInfo[i][pMod] == 1)
        {
            new admtext[10];
            if(PlayerInfo[i][pAppearList] == 1 || PlayerInfo[i][pAppearList] == 0)
            {
                if(PlayerInfo[i][pMod] == 1) { admtext = "Moderator"; }
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof string, "%s: %s %s", admtext, pName, (PlayerInfo[i][pModDuty] ? ("- On Duty") : ("")));
                SCM(playerid, COLOR_GRAD, string);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
/staff command problem - by whando - 03.02.2014, 20:28
Re: /staff command problem - by erminpr0 - 03.02.2014, 23:21

Forum Jump:


Users browsing this thread: 1 Guest(s)