nitanmarcel Posted October 6, 2015 Share Posted October 6, 2015 (edited) How to make the player to not go in ragdoll when is falling from a high height, on ground? Sorry for my bad English I have this code: if ((GTA.Native.Function.Call<bool>(GTA.Native.Hash.IS_PED_JUMPING, pplayer))) { GTA.Native.Function.Call(GTA.Native.Hash.CLEAR_PED_TASKS, pplayer); GTA.Native.Function.Call(GTA.Native.Hash.CLEAR_PED_SECONDARY_TASK, pplayer); Game.Player.Character.ApplyForce((Vector3.WorldUp * jumpForceA + Game.Player.Character.ForwardVector * jumpForceB + Vector3.WorldDown * jumpForceC)); GTA.Native.Function.Call(GTA.Native.Hash.DISABLE_PED_PAIN_AUDIO, pplayer, true); } if (pplayer.IsInAir) { GTA.Native.Function.Call(GTA.Native.Hash.DISABLE_PED_PAIN_AUDIO, pplayer, true); Game.Player.Character.CanRagdoll = false; } Where: private float jumpForceA = 50; // Vector3.WorldUp forceprivate float jumpForceB = 100; // ForwardVector forcePed pplayer = Game.Player.Character; Thanks! Edited October 6, 2015 by nitanmarcel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now