19.02.2012, 14:24
I recommend you change to ZCMD, as this is much better and less laggy.
Put this on top.
Here is the command
And on top of every command do this.
Don't want to use ZCMD? Then I guess you have to turn this into strcmp. :P
Put this on top.
pawn Код:
new CMDS;
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;
}
pawn Код:
if(CMDS == 0) return SendClientMessage(playerid, -1, "Commands are disabled");