Needed A Help Fast! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Needed A Help Fast! (
/showthread.php?tid=571593)
Needed A Help Fast! -
System64x - 20.04.2015
in The Filter Script
[FS] rRace v0.2a ~ RyDeR`s Race System [26/04/2010] [v0.2a] --->
https://sampforum.blast.hk/showthread.php?pid=3435079#pid3435079
HOW TO DISABLE PLAYER COMMANDS AND HOT KEYS IN THE RACE TIME

PLEASE HELP ME Except /exit
Re: Needed A Help Fast! -
SilverSkill - 20.04.2015
If you want to disable a command you can do some like this:
Is:
you change the '1' to '0' like
and yeah this is how to disable a command..
If it don't work i don't know, and sorry for my bad english.
Re: Needed A Help Fast! -
Alpay0098 - 20.04.2015
And also , you can use /* and */ to diasble like :
PHP код:
CMD:test(playerid, params[])
{
SendClientMessage(playerid, COLOR_WHITE, "This one will work.");
return 1;
}
/*CMD:work(playerid, params[])
{
SendClientMessage(playerid, COLOR_WHITE, "But this one won't work :'(");
return 1;
}*/
/work won't work but test will work properly.
G' Luck
Re: Needed A Help Fast! -
fuckingcruse - 20.04.2015
Ok , so its easy make a variable
new IsInRace[MAX_PLAYERS];
And in the race cmd type
IsInRace[playerid] = true;
Make a cmd to leave it
And in that leave cmd type
IsInRace[playerid] = false;
And in OnPlayerCommandTest
Blah blah blah
On strcmp your race cmd
Type the race cmd && the leave cmd
And if(IsInRace[playerid])
And only leave cmd is allowed
This is how to disable all cmd except /leave
I made such topic here
https://sampforum.blast.hk/showthread.php?tid=568097