private static void CancelCrouch() { try { API.ResetPedMovementClipset(Cache.PlayerHandle, 1); API.ResetPedStrafeClipset(Cache.PlayerHandle); InteractionListMenu.SetWalkingStyle(); } catch (Exception ex) { Log.Error(ex); } }
/// <summary> /// Return (and handle) whether or not player has cancelled Crouch state /// </summary> private static bool IsCrouchStateCancelled() { try { if (!Game.PlayerPed.IsRagdoll && !Game.PlayerPed.IsInMeleeCombat) { return(false); } Game.PlayerPed.Task.ClearAll(); API.ResetPedMovementClipset(Cache.PlayerHandle, 1); API.ResetPedStrafeClipset(Cache.PlayerHandle); InteractionListMenu.SetWalkingStyle(); return(true); } catch (Exception ex) { Log.Error(ex); return(false); } }