Needed A Help Fast!
#1

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
Reply
#2

If you want to disable a command you can do some like this:
Is:
Код:
return 1;
you change the '1' to '0' like
Код:
return 0;
and yeah this is how to disable a command..
If it don't work i don't know, and sorry for my bad english.
Reply
#3

And also , you can use /* and */ to diasble like :
PHP код:
CMD:test(playeridparams[])
{
    
SendClientMessage(playeridCOLOR_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
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)