Quote:
Originally Posted by EiresJason
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);
}
|
How do I make injured player (below 20 health) keeps decreasing 1% health every 4 seconds?