/Setlevel Command
#1

Okay I been working on my admin system, due to alot of ABUSIVE head admins, I want to make /setlevel only for RCON admins.

This is my code


pawn Код:
dcmd_setlevel(playerid,params[]) {
    if(PlayerInfo[playerid][LoggedIn] == 1) {
        if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
            new tmp[256], tmp2[256], Index;     tmp = strtok(params,Index), tmp2 = strtok(params,Index);
            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /setlevel [playerid] [level]");
            new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            player1 = strval(tmp);
            if(!strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setlevel [playerid] [level]");
            level = strval(tmp2);
I need to change the

pawn Код:
if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
But when i remove the if(PlayerInfo[playerid][Level] >= 5 then it has errors please Help me!
Reply
#2

What are you trying to change it to?
Reply
#3

Quote:
Originally Posted by UnknownGamer
Посмотреть сообщение
What are you trying to change it to?
Read it... that only rcon admins can use it.
Reply
#4

if(IsPlayerAdmin(playerid))
Reply
#5

THANKS vIBIENNY
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)