Health Detection/Injury System
#3

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;
    }
}
And then:
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    if(Injured[damagedid] == 1)
    {
        SetPlayerChatBubble(damagedid, (( THIS PLAYER IS DEAD )), RED, 100.0, 4343344); //or just make a 3d text
     }
}
Just a thought.
Reply


Messages In This Thread
Health Detection/Injury System - by xLucy - 10.04.2017, 10:22
Re: Health Detection/Injury System - by khRamin78 - 10.04.2017, 10:27
Re: Health Detection/Injury System - by Kane - 10.04.2017, 10:33
Re: Health Detection/Injury System - by xLucy - 10.04.2017, 10:35
Re: Health Detection/Injury System - by khRamin78 - 10.04.2017, 10:35
Re: Health Detection/Injury System - by xLucy - 10.04.2017, 10:37
Re: Health Detection/Injury System - by xLucy - 10.04.2017, 10:44
Re: Health Detection/Injury System - by Kane - 10.04.2017, 10:46
Re: Health Detection/Injury System - by Kane - 10.04.2017, 10:49
Re: Health Detection/Injury System - by xLucy - 10.04.2017, 10:51

Forum Jump:


Users browsing this thread: 1 Guest(s)