10.10.2013, 00:56
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
if(hp <= 20)
{
TogglePlayerControllable (playerid,0);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.1,0,1,1,1,1,1);
SetTimerEx("MoreThan20HP",1000,true,"i",playerid);
}
return 1;
}
forward MoreThan20HP(playerid);
public MoreThan20HP(playerid)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
if(hp >= 21) TogglePlayerControllable (playerid,1);
}