22.01.2014, 15:02
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.
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.