Helpme with setlevel
#2

Change the variables etc to what your databse uses (mine is SQLite)
pawn Код:
CMD:setadmin(playerid,params[])
{
    if(User[playerid][USER_ADMIN] >= 7 || IsPlayerAdmin(playerid))
    {
        new targetid,level,string[180];
        if(sscanf(params, "ud", targetid, level)) return  SendClientMessage(playerid,-1,"/setadmin [playerid] [level]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,"Player is not online");
        if(level < 0 || level > 7) return SendClientMessage(playerid,-1,"Admin levels are only between 1-7");

        User[targetid][USER_ADMIN] = level;

    }
    else
    {
        SendClientMessage(playerid,-1,""COL_RED" You do not have the right admin permissions for this command!");
    }
    return 1;
}
Reply


Messages In This Thread
Helpme with setlevel - by ReD_HunTeR - 26.11.2013, 16:40
Re: Helpme with setlevel - by Voxel - 26.11.2013, 16:47
Re: Helpme with setlevel - by ReD_HunTeR - 05.12.2013, 17:42

Forum Jump:


Users browsing this thread: 1 Guest(s)