Scripting Moderators ds1-e Posted May 10, 2019 Scripting Moderators Share 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 Link to comment
Moderators IIYAMA Posted May 10, 2019 Moderators Share 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 Link to comment
Investor Posted May 10, 2019 Share 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 Link to comment
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