sacr1ficez Posted May 10, 2019 Posted May 10, 2019 Hey, i would need to check if ped is not on ground - if so, then i want move him to the ground. I will use this function as first, but what later? https://wiki.multitheftauto.com/wiki/IsPedOnGround Is there any way to get "closest" ground position? 1 Script security
Moderators IIYAMA Posted May 10, 2019 Moderators Posted May 10, 2019 (edited) @majqq Getting the ped height from the centre: https://wiki.multitheftauto.com/wiki/GetElementBoundingBox An alternative: getElementPosition - https://wiki.multitheftauto.com/wiki/GetPedBonePosition Edited May 10, 2019 by IIYAMA 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Investor Posted May 10, 2019 Posted May 10, 2019 (edited) bool isPedOnGround ( ped thePed ) float getGroundPosition ( float x, float y, float z ) getGroundPosition is client-side only and requires the world to be streamed in at that position at the time of calling the function, but if the player is above it it should be loaded. Edited May 10, 2019 by Investor 1 If I helped, leave a "Thanks".
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