SetTimer or onplayerupdate?. - 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: SetTimer or onplayerupdate?. (
/showthread.php?tid=243543)
SetTimer or onplayerupdate?. -
[BKR]LUCAGRABACR - 23.03.2011
Hi, so I try to script that if a vehicle's health reach < 300 then the engine will stop, but my question is, to create that I must use a timer with 1 milisecond timer or onplayerupdate? thanks in advance.
Re: SetTimer or onplayerupdate?. - XFlawless - 23.03.2011
I suggest you to use 1000ms = 1 second or it will cause lag on server.
Re: SetTimer or onplayerupdate?. -
OldDirtyBastard - 23.03.2011
OnPlayerUpdate is called more than 100 times per second, a 1 or half second timer in your case is much efecient.
Re: SetTimer or onplayerupdate?. -
-Rebel Son- - 23.03.2011
Use a timer and a function bud. OnPlayerUdate is called to many times.
Re: SetTimer or onplayerupdate?. -
[BKR]LUCAGRABACR - 24.03.2011
Alright, thanks for the help guys, I'm convinced now
.