Would this cause CPU overload? - 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: Would this cause CPU overload? (
/showthread.php?tid=114614)
Would this cause CPU overload? -
DiddyBop - 20.12.2009
If i made a timer to heal everybody on server every 1 second, would this cause to much CPU usage? (20-50 players)
Also, is there a way to heal every 100MS? like..
SetTimer("Healall", 500, 1); ? or would that cause to much lag?
Re: Would this cause CPU overload? -
LarzI - 20.12.2009
Try it yourself
Re: Would this cause CPU overload? -
patchkinson - 20.12.2009
Yup, try it urself, depends of the CPU and ur script and ur NPC's!
Re: Would this cause CPU overload? -
DiddyBop - 20.12.2009
ima try now.. im using serverffs and so far i never have any lag so... lets see
Re: Would this cause CPU overload? -
Retardedwolf - 20.12.2009
Just use OnPlayerLoseHealth function to detect loose of HP and then heal them easier.
Re: Would this cause CPU overload? -
DiddyBop - 20.12.2009
would make it under a timer? or onplayerupdate? Directed @ ******.
Re: Would this cause CPU overload? -
Christopher. - 20.12.2009
Quote:
Just use OnPlayerLoseHealth function to detect loose of HP and then heal them easier.
|
There isn't a "OnPlayerLoseHealth" Function.
Re: Would this cause CPU overload? -
DiddyBop - 20.12.2009
Quote:
Originally Posted by Chris - X-Host
Quote:
Just use OnPlayerLoseHealth function to detect loose of HP and then heal them easier.
|
There isn't a "OnPlayerLoseHealth" Function.
|
I do believe sombody made this function though.
Re: Would this cause CPU overload? -
LarzI - 20.12.2009
Check out YUP, I think that's where you got that function from.
It's anyways easy to make yourself actually.
Re: Would this cause CPU overload? -
Retardedwolf - 24.12.2009
http://forum.sa-mp.com/index.php?topic=41954.0
But it still uses a 100MS timer