I need help about health
#1

Hi guys,
I have a problem with adding Health to player. I made re-heathing system. So, if is Health below 75.00%, server will add 0.750% every 15 seconds. But, my code don't work... See code below

Код:
new Float:_pHP;
			GetPlayerHealth(_playerid, _pHP);

if(_pHP <= _REHEALTH_MIN_VALUE)
{
new Float:_new_pHP = floatadd(_REHEALTH_VALUE / 2, _REHEALTH_VALUE / 2) + _pHP;

				SetPlayerHealth(_playerid, _new_pHP);
				va_SendClientMessage(_playerid, -1, "- Rehealthan si || %f + %f = %f", _pHP, _new_pHP, _pHP + _new_pHP);
}
See chatlog(for searching for bugs)

Quote:

11:03:07] - Rehealthan si || 36.000000 + 36.720001 = 72.720001
[11:03:23] - Rehealthan si || 36.000000 + 36.720001 = 72.720001

So, how I can make system which will give 0.750% hp on my current hp?

Thanks You
Reply
#2

Somebody help?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)