SA-MP Forums Archive
Enable/Disable commands - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Enable/Disable commands (/showthread.php?tid=79784)



Enable/Disable commands - JoshTheBoss - 30.05.2009

could someone maybe help with a code so that when you teleport to somewhere, that other commands will be disabled?

i have been searching a lot so please help me!!!


Re: Enable/Disable commands - miokie - 30.05.2009

at the top of your script:
pawn Code:
new Teled[MAX_PLAYERS];
Add to the top of all your commands you want the player not to do:
pawn Code:
if(Teled[playerid] == 1) return SendClientMessage(playerid,COLOR,"Text...");
Add to your teleport command:
pawn Code:
Teled[playerid] = 1;



Re: Enable/Disable commands - JoshTheBoss - 31.05.2009

thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!