Timer is server wide? - 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: Timer is server wide? (
/showthread.php?tid=137599)
Timer is server wide? -
Packer5 - 29.03.2010
I'm a little confused. I've made a tutorial, and I added a timer:
So basically, when the user types /help, the timer is set for 10 seconds
Код:
SetTimer("tut1", 10000, false);
This works absolutely no problem. The player gets teleported to the jail, the message comes up. Then the next timer takes you to the next part:
There is no timer on that, so the script hangs until the player types one of the commands above as instructed.
HOWEVER
In the meantime, someone else typed /help.
They wait 10 seconds but never get teleported to the first place, instead, the first guy goes from step 3, to step 2 (back to the jail) and the 2nd guy doesn't go anywhere.
I can't work out why this is. some help would be awesome
Thanks
ask me for more info. if needed
Re: Timer is server wide? -
Zimon95 - 29.03.2010
Try to use SetTimerEx function associated with playerid:
Example:
pawn Код:
SetTimerEx("tut1", 10000, false, "i", playerid);
Re: Timer is server wide? -
Packer5 - 29.03.2010
thank you so much it works perfectly now!