SetPlayerHealth
#1

I saw one big bug in function 'SetPlayerHealth', I can't normally add Health...

Example

Code:
				new Float:_new_pHP = _REHEALTH_VALUE + _pHP;
				SetPlayerHealth(_playerid, _new_pHP);

				new Float:_n_pHP;
				GetPlayerHealth(_playerid, _n_pHP);
				va_SendClientMessage(_playerid, -1, "- Rehealthan si || Stari Health %.2f - Novi Health %.2f(Stvarni %.2f)", _pHP, _new_pHP, _n_pHP);
This code doesn't work, why?
Reply
#2

My take on it is that the player needs to send an update before the server updates it's internal variable. Best thing to do in cases like this is create your own server sided variables.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)