I want to make a simple broken leg system
#1

So the title says it all, i wan't to make a simple system that every time player jump off from a high building, he brokes his legs and he will unable to sprint.
can someone give me some tutorials?
Reply
#2

check for animations of falling mann
Reply
#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
#4

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
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;

Thank, i tried it, that's cool man but is that possible that we can add when player felt down?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)