Time Limit On Command - 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: Time Limit On Command (
/showthread.php?tid=136406)
Time Limit On Command -
gtapolicemods - 25.03.2010
I have a welfare command made. /welfare... The people on welfare go to city hall and do /welfare [Password] to get there welfare check.
My question is there a way to put a time limit on that command to where they can't keep doing it.
Re: Time Limit On Command -
Las Venturas CNR - 25.03.2010
I've got this question too

How to limit a command with a timer...
Re: Time Limit On Command -
XGh0stz - 25.03.2010
You can use a timer to get this done, just set a timer and when it goes off, allow them to use the command again... For example, let's example a simple varible called welfare. When the command is executed, check to see if the welfare varible is 0, if it is, give them the paycheck and change the welfare varible to 1, then also call a timer for the desired amount of time which that timer will set the welfare varible back to 0