About 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: About OnPlayerUpdate (
/showthread.php?tid=111778)
About OnPlayerUpdate -
Elorreli - 03.12.2009
I'm using OnPlayerUpdate, and the server is using way too much CPU because of it. What can i replace it with? I would need some explanations.
Thanks,
- S
Re: About OnPlayerUpdate -
Correlli - 03.12.2009
Depends for what do you want to use it? You could use timer (one second timer) if you don't need to execute the code so fast.
Re: About OnPlayerUpdate -
Elorreli - 03.12.2009
added the code aswell
Re: About OnPlayerUpdate -
Correlli - 03.12.2009
No, no and no. Check this topic -
http://forum.sa-mp.com/index.php?topic=115828.0
Re: About OnPlayerUpdate -
Elorreli - 03.12.2009
That tells me nothing.
Re: About OnPlayerUpdate -
Correlli - 03.12.2009
Then read it again.
You're using GF/GF edit which had the name "OnPlayerUpdate" before the 0.2 came out with the native OnPlayerUpdate.
Change this OnPlayerUpdate to something like OnPlayerUpdateEx.
Re: About OnPlayerUpdate -
Elorreli - 03.12.2009
Just replace
OnPlayerUpdate
With
OnPlayerUpdateEx
That sounds too simple
Re: About OnPlayerUpdate -
Correlli - 03.12.2009
Not just the callback name, but every GF's OnPlayerUpdate.
Re: About OnPlayerUpdate -
Elorreli - 03.12.2009
Don't you have to do anything more than change all the OnPlayerUpdate to OnPlayerUpdateEx?
I mean, it must involve something more than that?
Re: About OnPlayerUpdate -
Sergei - 03.12.2009
I don't know why would you save stats anywhere else than under OnPlayerDisconnect anyway ..