OnPlayerTakeDamage reliability issue
#2

The reason for this is that both GTA and the SA-MP server deal with the health as a float (4 bytes), but it's actually synced from the player to the server 1 byte in order to save bandwidth. So what you are seeing is basically a rounding problem.

This really should be fixed at some point.

What I can say is that the player's health and armour does match what you have there as the server-sided version, you just can't see it accurately with GetPlayerHealth/GetPlayerArmour.

SetPlayerHealth and SetPlayerArmour do send full floats, so the player will get those changes without any rounding problems.
Reply


Messages In This Thread
OnPlayerTakeDamage reliability issue - by Zhao - 22.01.2014, 14:32
Re: OnPlayerTakeDamage reliability issue - by Kalcor - 22.01.2014, 15:02
Re: OnPlayerTakeDamage reliability issue - by Zhao - 22.01.2014, 19:33
Re: OnPlayerTakeDamage reliability issue - by CuervO - 22.01.2014, 22:51
Re: OnPlayerTakeDamage reliability issue - by ViruZz - 24.01.2014, 13:29

Forum Jump:


Users browsing this thread: 1 Guest(s)