[Sugest] OnPlayerUpdate -
scott1 - 30.09.2012
Hi all, i got an suggest for the onplayerupdate callback.
Ad extrat param.
OnPlayerUpdate(playerid,case,extrat[])
Case: Weapon Update, Pos Update
Extrat: Get AK47, was to 156.2,25.2,13.3 and move to 70.2,170.2,13.3
Thank You
Max
Re: [Sugest] OnPlayerUpdate -
Lordzy - 30.09.2012
GetPlayerWeapon can be used for such cases and it isn't needed.
OnPlayerUpdate is a callback and under that we can use many functions.
The weapon thing you said are all there, have a look on Wiki samp.
Btw, suggestions can be posted on thread "Suggestions for future SA-MP."
Re: [Sugest] OnPlayerUpdate -
RussellK - 30.09.2012
OnPlayerUpdate will be called roughly 20-50 times per second per player, depending on your streaming rate settings, and any processing done in there will visibly stop the server from being able to proceed new synchronization (try adding a really long look in there). Creating such a string for each of these updates that will very rarely be used, because the amount of data being written down there is much too extensive to output, is just unnecessarily overhead.
If the server keeps track of which fields of a player's state were modified during the last sync packet, a function such as GetPlayerLastUpdateData() could be added... The same question remains though: why would you want this? What is your use-case?
Re: [Sugest] OnPlayerUpdate -
Si|ent - 30.09.2012
This would fit better in the suggestions thread here:
https://sampforum.blast.hk/showthread.php?tid=302201&page=51