SA-MP Forums Archive
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)
+--- Thread: OnPlayerUpdate (/showthread.php?tid=315426)



OnPlayerUpdate - milanosie - 03.02.2012

Yozor, what does onplayerupdate do. I mean, when does a player update


Re: OnPlayerUpdate - [MG]Dimi - 03.02.2012

Position, weapon, text, camera move everything you can imagine


Re: OnPlayerUpdate - Wesley221 - 03.02.2012

OnPlayerUpdate gets called 16 times a second or so. Dont over-use it with player loops etc, otherwise it might be lagging your server.


Re: OnPlayerUpdate - milanosie - 03.02.2012

So its basicly a function that will get triggered every milisecond?


Respuesta: OnPlayerUpdate - junkbuster - 03.02.2012

Updated for example, health, armor, position, rotation, vehicles (mods, color, animation), the client will send information to the server and the server will call the OnPlayerUpdate.


Re: OnPlayerUpdate - Wesley221 - 03.02.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
16 times PER PLAYER, not 16 times.
16 times per player, per second right?


Re: OnPlayerUpdate - MP2 - 03.02.2012

It won't be called 16 times a second when standing still though - only around 4 or 5 times.


Re : OnPlayerUpdate - ricardo178 - 03.02.2012

Good place to an anti hack system i guess.. Also for saving.
Hope that i am not saying shit. Also, used for Speedo. At least i used.


Re: OnPlayerUpdate - milanosie - 03.02.2012

Not for saving, will be lagging. I am placing my weaponhack here


Re: OnPlayerUpdate - MP2 - 03.02.2012

OnPlayerUpdate should only be used for small things that NEED to be called frequently i.e. weapon detection or a speedo^.