SA-MP Forums Archive
Problem with health - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Problem with health (/showthread.php?tid=556235)



Problem with health - OKStyle - 10.01.2015

We try: SetPlayerHealth(playerid, 50.15);
but in GetPlayerHealth we got 50.0

What func rounded float value without my command?


Re: Problem with health - Pottus - 10.01.2015

That is normal because of the way that data type is changed for net play but all you really need to do is make your own damage system variable.


Re: Problem with health - kurta999 - 10.01.2015

class CSyncData
{
public:
WORD wUDAnalog; // 0x0076 - 0x0078
WORD wLRAnalog; // 0x0078 - 0x007A
WORD wKeys; // 0x007A - 0x007C
CVector vecPosition; // 0x007C - 0x0088
float fQuaternionAngle; // 0x0088 - 0x008C
CVector vecQuaternion; // 0x008C - 0x0098
BYTE byteHealth; // 0x0098 - 0x0099
BYTE byteArmour; // 0x0099 - 0x009A

BYTE byteWeapon; // 0x009A - 0x009B
BYTE byteSpecialAction; // 0x009B - 0x009C
CVector vecVelocity; // 0x009C - 0x00A8
CVector vecSurfing; // 0x00A8 - 0x00B4
WORD wSurfingInfo; // 0x00B4 - 0x00B6
int iAnimationId; // 0x00B6 - 0x00BA
// Size = 68
};

This is the problem..