Levels
#1

pawn Код:
CMD:kick(playerid,params[])
{
    if((PInfo[playerid][Level] < 1) || (PInfo[playerid][Operator] < 1)) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You are not allowed to use this command!");
    new id;//Creating a variable to store the selected id;
    //new Target;
    //if(Target == playerid) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You cant kick yourself!");
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /kick <id>");//Checking if the player has selected an id, other wise it sends him a message. We used the "u" specifier, because he can put a name or an id.
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-4,"That player is not connected!");//Checking if the selected user is connected or not.
    Kick(id);
    SendClientMessage(playerid,-1,"You have kicked the selected user!");
    return 1;
}
Why doesn't this work:
pawn Код:
if((PInfo[playerid][Level] < 1) || (PInfo[playerid][Operator] < 1)) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You are not allowed to use this command!");
it only takes the level but not the operator...
Reply


Messages In This Thread
Levels - by Biess - 21.12.2012, 12:49
Re: Levels - by LarzI - 21.12.2012, 13:08
Re: Levels - by Zex Tan - 21.12.2012, 13:24
Re: Levels - by Biess - 21.12.2012, 13:38
Re: Levels - by LarzI - 21.12.2012, 13:53
Re: Levels - by Mr.Anonymous - 21.12.2012, 13:59
Re: Levels - by LarzI - 21.12.2012, 14:21
Re: Levels - by Mr.Anonymous - 21.12.2012, 14:31
Re: Levels - by LarzI - 21.12.2012, 15:10
Re: Levels - by Mr.Anonymous - 21.12.2012, 15:23

Forum Jump:


Users browsing this thread: 1 Guest(s)