Best-Killer Posted December 17, 2015 Posted December 17, 2015 server-side : if not getElementData(plr, "isOnGround") then exports.SAEGMessages:sendClientMessage("Ironminer: You're not on the ground!", plr, 255, 0, 0) return end Client-Side: local is_on_ground,old_check = false,true function is_player_on_the_ground( ) local px, py, pz = getElementPosition(localPlayer) --outputConsole(getGroundPosition(px, py, pz + 10).." "..pz.." "..(getGroundPosition(px, py, pz + 10) + 2)) if getGroundPosition(px, py, pz + 10) < pz and (getGroundPosition(px, py, pz + 10) + 2) > pz then is_on_ground = true else is_on_ground = false end if is_on_ground ~= old_check then setElementData(localPlayer, "isOnGround", is_on_ground) old_check = is_on_ground end end is_player_on_the_ground() setTimer(is_player_on_the_ground, 500, 0) that shit not work 0 errors 0 warning i can boomb and i'm not on ground pls help
Dealman Posted December 17, 2015 Posted December 17, 2015 Uh not quite sure what you're trying to do, but can't you... just... use this? isPedOnGround If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
Moderators IIYAMA Posted December 17, 2015 Moderators Posted December 17, 2015 Or https://wiki.multitheftauto.com/wiki/ProcessLineOfSight 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
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