GetPlayerAnimationIndex doesn't work on looped anims
#1

I'm using this filterscript to debug the anims https://sampforum.blast.hk/showthread.php?tid=182937, i just added animationindex value to the message

Tried this with 2 animations
Code:
ApplyAnimation(playerid,"MUSCULAR","MuscleSprint",4.0,1,1,1,1,1,1);
// and
ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,1,1,1,1,1,1);
images: https://imgur.com/a/TFYwruS

I was trying to make my custom sprint anim non-exploitable by adding some detections like getting the animation IDs but then I noticed that the animation doesn't stop when I release space. Animation 910 is MuscleSprint
Code:
if(RELEASED( KEY_SPRINT ) && GetPlayerAnimationIndex(playerid) == 910)
{
    ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
}
Is this a SA-MP bug or just something wrong with my script?

edit: i removed the loop and it showed up https://i.imgur.com/uwq33fy.png
but i need the loop so that the players can go left and right without stopping the sprint animation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)