cant do commands when... - 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: cant do commands when... (
/showthread.php?tid=211048)
cant do commands when... -
omer5198 - 14.01.2011
i want to make a minigun place or a war place but i dont know how to do that they wont be able to do any command exept quit command...
if i will let them teleport where ever they want they will still have there weapons....
so i need help on one of those two things:
1) dont do commands exept quit commands...
2) reset weapons when teleporting from the war/minigunplace (without another command like /war quit...)
Re: cant do commands when... -
alpha500delta - 14.01.2011
On top of your script put this:
pawn Код:
new CanExecuteCommand[MAX_PLAYERS] = 0;
Put this under your /dm command:
pawn Код:
CanExecuteCommand[playerid] = 1;
Then for teleports or any other commands
pawn Код:
if(CanExecuteCommands[playerid] == 1) return Do_Something
Then for /quit add this:
pawn Код:
CanExecuteCommand[playerid] = 0;
Hope I helped.
For the reset use
(I believe?)