I want to make a simple broken leg system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I want to make a simple broken leg system (
/showthread.php?tid=643968)
I want to make a simple broken leg system -
AndrewFrost - 31.10.2017
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?
Re: I want to make a simple broken leg system -
xMoBi - 31.10.2017
check for animations of falling mann
Re: I want to make a simple broken leg system -
ISmokezU - 31.10.2017
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(playerid, issuerid, Float:amount, weaponid, bodypart)
{
switch(bodypart)
{
// case BODY_PART_LEFT_LEG, BODY_PART_RIGHT_LEG:
case 7, 8:
{
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.1, false, false, false, true, false);
SetTimerEx("Recovery", 5000, false, "i", playerid);// Healing the Player
}
}
return true;
}
forward Recovery(playerid);
public Recovery(playerid)
{
SendClientMessage(playerid, -1, "Successfully Recovered");
ClearAnimations(playerid);
return true;
}
Re: I want to make a simple broken leg system -
AndrewFrost - 01.11.2017
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(playerid, issuerid, Float:amount, weaponid, bodypart)
{
switch(bodypart)
{
// case BODY_PART_LEFT_LEG, BODY_PART_RIGHT_LEG:
case 7, 8:
{
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.1, false, false, false, true, false);
SetTimerEx("Recovery", 5000, false, "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?