SA-MP Forums Archive
On weapon hit play animation. - 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: On weapon hit play animation. (/showthread.php?tid=574284)



On weapon hit play animation. - Zloto - 15.05.2015

Hello. I'm I wondering how can I make on weapon hit (with a 9mm for example) to apply animation on player? For example i hit a player with 9mm pistol and an animation
Код:
ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.1, 1, 1, 1, 1, 1, 1);



Re: On weapon hit play animation. - AdHaM612 - 15.05.2015

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
            if(
weaponid == 22// If the weapon used to damage is a 9mm. (Remove this if you want it to apply the animation if the player got hit with any weapon)
            
{
                       
ApplyAnimation(playerid"PED""WALK_DRUNK"4.1111111);
            }
            return 
1;