I want to make a simple broken leg system
#3

I have never done a Broken Leg System it's more of a Role Play thing if you ask me, anyway I made this just now, it should work If it does not try switching the cases from 7, 8 to BODY_PART_LEFT_LEG, BODY_PART_RIGHT_LEG (Remove the //). Also, try switching the animations for your favour.

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    switch(
bodypart)
    {
        
// case BODY_PART_LEFT_LEG, BODY_PART_RIGHT_LEG:
        
case 78:
        {
            
SendClientMessage(playerid, -1"You've been shot in your leg.");
            
//ApplyAnimation(playerid, "PED", "CLIMB_jump2fall", 4.1, false, false, false, false, false);
            
ApplyAnimation(playerid,"PED","FALL_collapse"4.1falsefalsefalsetruefalse);
            
SetTimerEx("Recovery"5000false"i"playerid);// Healing the Player
        
}
    } 
    return 
true;
}
forward Recovery(playerid);
public 
Recovery(playerid)
{
    
SendClientMessage(playerid, -1"Successfully Recovered");
    
ClearAnimations(playerid);
    return 
true;

Reply


Messages In This Thread
I want to make a simple broken leg system - by AndrewFrost - 31.10.2017, 16:09
Re: I want to make a simple broken leg system - by xMoBi - 31.10.2017, 16:27
Re: I want to make a simple broken leg system - by ISmokezU - 31.10.2017, 22:21
Re: I want to make a simple broken leg system - by AndrewFrost - 01.11.2017, 03:53

Forum Jump:


Users browsing this thread: 1 Guest(s)