IS player admin !!
#6

easy exp of this in command
Код:
CMD:setlevel(playerid, params[])
{
    new victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id;
    if(PlayerInfo[playerid][pAdmin] >=7 || IsPlayerAdmin(playerid))
    {
        if (sscanf(params, "ui", id, admlvl)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setlevel [id] [adminlevel]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[ERROR]:Invalid ID");
        if (admlvl > 10 || admlvl < 0) return SendClientMessage(playerid, COLOR_RED,"[ERROR]: Valid Admin Levels: 1-10!");
        PlayerInfo[id][pAdmin] = admlvl;
        GetPlayerName(id, victimname, sizeof(victimname));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        new str[128];
        format(str,128,"Admin %s [ID %d] has set %s [ID %d] admin level to %i",adminname, playerid, victimname, id, admlvl);
        SendClientMessage(playerid,COLOR_BLUE,str);
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!");
}
Reply


Messages In This Thread
IS player admin !! - by aysam7 - 19.12.2015, 14:07
Re: IS player admin !! - by TwinkiDaBoss - 19.12.2015, 14:08
Re: IS player admin !! - by GeneralAref - 19.12.2015, 14:17
Re: IS player admin !! - by J0sh... - 19.12.2015, 14:22
Re: IS player admin !! - by aysam7 - 19.12.2015, 15:35
Re: IS player admin !! - by GeneralAref - 19.12.2015, 15:48

Forum Jump:


Users browsing this thread: 2 Guest(s)