SA-MP Forums Archive
Question Timer during code - 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: Question Timer during code (/showthread.php?tid=410851)



SOLVED - jakejohnsonusa - 27.01.2013

How can I make a blank timer, that does nothing for 15000 miliseconds (15 seconds), to delay code?


Re: Question Timer during code - iGetty - 27.01.2013

What about the sleep function, ******?

https://sampwiki.blast.hk/wiki/Keywords:Statements#sleep


Re: Question Timer during code - jakejohnsonusa - 27.01.2013

Yea thats what I was looking for... But I guess the SetTimer can work.

Thanks!


Re: Question Timer during code - jakejohnsonusa - 27.01.2013

Nope, timer didn't work. Is ther any easy way of just pausing the code where it is for 15 seconds and then continuing, the timer didn't work... It started and continued (not waited)...

Anyone know?

Thanks in advance!


Re: Question Timer during code - jakejohnsonusa - 27.01.2013

Thanks, I figured it out.

For people wondering,

Made a SetTimerEx and added a TimeUp variable, so that when the timer finished it set TimeUp to 1, and then I had the code after the timer started start if(TimerUp ==1).