Help with command
#4

I recommend you change to ZCMD, as this is much better and less laggy.

Put this on top.
pawn Код:
new CMDS;
Here is the command

pawn Код:
cmd(commandson, playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You cannot use this command");
    if(CMDS == 0)
    {
        CMDS = 1;
        SendClientMessageToAll(-1, "All commands are disabled");
    }
    else
    {
        CMDS = 0;
        SendClientMessageToAll(-1, "All commands are enabled");
    }
    return 1;
}
And on top of every command do this.

pawn Код:
if(CMDS == 0) return SendClientMessage(playerid, -1, "Commands are disabled");
Don't want to use ZCMD? Then I guess you have to turn this into strcmp. :P
Reply


Messages In This Thread
Help with command - by boyan96 - 19.02.2012, 14:15
Re: Help with command - by aRoach - 19.02.2012, 14:15
Re: Help with command - by boyan96 - 19.02.2012, 14:17
Re: Help with command - by JhnzRep - 19.02.2012, 14:24
Re: Help with command - by Littlehelper - 19.02.2012, 14:24
Re: Help with command - by aRoach - 19.02.2012, 14:25
Re: Help with command - by JhnzRep - 19.02.2012, 14:26
Re: Help with command - by boyan96 - 19.02.2012, 14:33
Re: Help with command - by Littlehelper - 19.02.2012, 14:38
Re: Help with command - by boyan96 - 21.02.2012, 07:29

Forum Jump:


Users browsing this thread: 4 Guest(s)