19.11.2009, 00:25
hi a little Help please thanks i want to make so when health drops it will do somthing i can only figure how to make it do somthing on change as i want it to do somthing when it drop's not when it goes back up this is my bit of code any help please thanks alot.
thanks for your help
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:Life;
new Float:Oldhealth,Float:newhealth;
GetPlayerHealth(playerid, Life);
if (PlayerLife[playerid] != Life)
{
HealthChange(playerid, Oldhealth, newhealth);
PlayerLife[playerid] = Life;
}
return 1;
}
forward HealthChange(playerid, Float:Oldhealth, Float:newhealth);
public HealthChange(playerid, Float:Oldhealth, Float:newhealth)
{
// ill add my bit of code here! :D
return 1;
}
thanks for your help