10.04.2017, 10:35
Quote:
Here's what you could do, I have a similar system in my script.
Код:
new Injured[MAX_PLAYERS]; Код:
public OnPlayerUpdate(playerid) { new Float: playersHealth; GetPlayerHealth(playerid, playersHealth); if(playersHealth <= 10) { SendClientMessage(playerid, -1, "You are critically injured. You may /acceptdeath or wait for a medic to revive you."); LoopingAnim(playerid,"SWEET","Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0); Injured[playerid] = 1; } Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { if(Injured[damagedid] == 1) { SetPlayerChatBubble(damagedid, (( THIS PLAYER IS DEAD )), RED, 100.0, 4343344); } } |
but you have to do if(playersHealth <= 10 && playersHealth != 0)
cuse as i know he dont wants that for who got killed and also if hes hp became 0 it will loop in if statement of onplayerupdate