How do i enable and disable commands?
#8

In your script you could add a variable to turn the command on or off.

example:
Код:
	if(strcmp(cmdtext, "/cash", true) == 0 && CmdInUse == 1) {
		GivePlayerMoney(playerid, 100000);
 		return 1;
	}
Turn the cash command on:
Код:
	if(strcmp(cmdtext, "/Cashon", true) == 0) {
		CmdInUse[playerid] =1;
 		return 1;
	}
Turn the cash command off:
Код:
	if(strcmp(cmdtext, "/Cashoff", true) == 0) {
		CmdInUse[playerid] =0;
 		return 1;
	}
Reply


Messages In This Thread
How do i enable and disable commands? - by Coolman12 - 16.04.2009, 21:35
Re: How do i enable and disable commands? - by Backwardsman97 - 17.04.2009, 00:55
Re: How do i enable and disable commands? - by Coolman12 - 17.04.2009, 10:08
Re: How do i enable and disable commands? - by Kirkmaster10 - 17.04.2009, 10:33
Re: How do i enable and disable commands? - by Coolman12 - 17.04.2009, 10:38
Re: How do i enable and disable commands? - by tom_jonez - 17.04.2009, 10:48
Re: How do i enable and disable commands? - by ruarai - 17.04.2009, 10:49
Re: How do i enable and disable commands? - by streetzuk - 17.04.2009, 10:49
Re: How do i enable and disable commands? - by Pyrokid - 17.04.2009, 23:20
Re: How do i enable and disable commands? - by streetzuk - 18.04.2009, 10:47

Forum Jump:


Users browsing this thread: 3 Guest(s)