Helpme with setlevel
#1

i need someone to make setlevel cmd and send the codes here, ill +rep you
Reply
#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
#3

thanks that helps, me! +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)