13.06.2011, 15:03
Hello,am using: http://forum.sa-mp.com/archive/index.php/t-59771.html
So I addited to my gamemode public OnPlayerHealthChange(playerid, Float:newhealth, Float
ldhealth).
So I addited this stuf:
I want if player ,which has safezone = 1,when his health gets lower,it will give back old heath.
When I enter checkpoint it gives 1hp.Where is the problem?
So I addited to my gamemode public OnPlayerHealthChange(playerid, Float:newhealth, Float

So I addited this stuf:
Код:
public OnPlayerHealthChange(playerid, Float:newhealth, Float:oldhealth) { if(safezone[playerid] == 1) { if(oldhealth > newhealth || oldhealth < newhealth) { SetPlayerHealth(playerid,oldhealth); SafeTimer = SetTimer("KillProtectionTimer",10000,false); } } return 1; }
When I enter checkpoint it gives 1hp.Where is the problem?