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: Animation (
/showthread.php?tid=607084)
Animation -
GoldenLion - 14.05.2016
Hello, I'm working on an injury system now.
So when player is injured then he is in the crack animation.
Код:
ApplyAnimation(playerid, "CRACK", "crckdeth4", 4.0, 1, 0, 0, 1, 0, 1);
So what I want to do is if script detects that player is not in that animation anymore while injured it puts him back in this animation. I know it's done with GetPlayerAnimationIndex, but how?
Re: Animation -
GoldenLion - 14.05.2016
I found that myself. This is for crckdeth2 though not crackdeth4

This is what I put under OnPlayerUpdate:
Код:
if (Injured[playerid] == 1 && GetPlayerAnimationIndex(playerid) != 386)
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 1, 0, 1);
}