[Pawn] [Solved] GetAnimationName() is not working properly - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] [Solved] GetAnimationName() is not working properly (/showthread.php?tid=1800) |
[Solved] GetAnimationName() is not working properly - Radical - 2021-03-23 SOLUTION: Store that animation lib and name in a variable. e.g. : Code: new rAnimLib[MAX_PLAYERS][20]; I use GetAnimationName() function but it only returns PED, IDLE_STANCE or PED,SEAT_IDLE or PED,WOMAN_IDLESTANCE. When i apply another animations like /eat, /sit, /lay this function not give me the applied animation animlib and animname but just return PED, IDLE_STANCE. PHP Code: ApplyAnimation(playerid,"BEACH","Lay_Bac_Loop",4.1, 0, 1, 1, 1, 1, 1); // Sit In other gamemodes that I test, this problem does not occur. I need to fix this problem quickly. thanks for the anyone answer. RE: GetAnimationName() is not working properly - Radical - 2021-03-24 Bump Does the lagcomp 0 have an effect on this function? RE: GetAnimationName() is not working properly - DandoRYx - 2021-03-24 Changing the time value fixed this. I changed it to 4000: PHP Code: ApplyAnimation(playerid,"BEACH","Lay_Bac_Loop", 4.1, 0, 1, 1, 1, 4000, 1); The only issue is that you can't exit the animation until 4 seconds (4000 ms) pass. EDIT: After those 4 seconds, GetAnimationName gives PED, IDLE_STANCE so this won't help you much. You can lock a player and then check if he pressed ENTER and cancel the animation or something like that. |