04.02.2017, 04:34
(
Последний раз редактировалось UnholyBeast; 04.02.2017 в 07:34.
Причина: Posting how I fixed the issue.
)
Ok. I've spent the past 20 mintues trying to get this animation to stop looping.
Here's the code:
Before trying the stock function "StopLoopingAnim" I tried ClearAnimations(playerid); and SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
None of it has worked. Is it the way I applied the animation to the player?
[EDIT]: Kept screwing around with various different methods and this is the only way I have found that worked. (I'm sure there's other methods, but this worked for me 100%.)
Here's the code:
Код:
stock RobberySuccessful(playerid) { SendMessage(playerid, -1, "[DEBUG]: Robbery Started."); ClearAnimations(playerid); ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.1, 1, 0, 0, 1, 1, 1); gPlayerUsingLoopingAnim[playerid] = 1; RobberyStarted[playerid] = 1; StartGlobalRobberyTimer(playerid); return 1; } public GlobalRobberyTimer_Func(playerid) { StopLoopingAnim(playerid); RobberyStarted[playerid] = 0; return 1; } stock StartGlobalRobberyTimer(playerid) { SetTimerEx("GlobalRobberyTimer_Func", 25000, false, "i", playerid); return 1; } stock StopLoopingAnim(playerid) { gPlayerUsingLoopingAnim[playerid] = false; ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0); ClearAnimations(playerid); }
None of it has worked. Is it the way I applied the animation to the player?
[EDIT]: Kept screwing around with various different methods and this is the only way I have found that worked. (I'm sure there's other methods, but this worked for me 100%.)
Код:
stock ClearPlayerAnim(playerid); { new skin; skin = GetPlayerSkin(playerid); SetPlayerSkin(playerid, skin); return 1; }