Best-Killer Posted December 17, 2015 Share 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 Link to comment
Dealman Posted December 17, 2015 Share Posted December 17, 2015 Uh not quite sure what you're trying to do, but can't you... just... use this? isPedOnGround Link to comment
Moderators IIYAMA Posted December 17, 2015 Moderators Share Posted December 17, 2015 Or https://wiki.multitheftauto.com/wiki/ProcessLineOfSight 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