Health Detection/Injury System
#5

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
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);
     }
}
Just a thought.
ye its allright
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
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)