12.08.2011, 07:09
I've created a timer that checks their health every second...
I think I did something wrong with the ApplyAnimation function ?
pawn Код:
forward HealthCheck(playerid);
public OnGameModeInit()
{
SetTimer("HealthCheck", 1000, true); // Set a timer of 1000 miliseconds (1 second)
return 1;
}
public HealthCheck(playerid)
{
new Float:health;
GetPlayerHealth(playerid,health);
if (health < 30.0)
{
ApplyAnimation(playerid,"PED","crckdeth2",2.1,1,1,1,1,1,1);
}
return 1;
}