Jump to content

get world position when the player click on f11 map


Ryder!

Recommended Posts

hi, i want to get the world position ( x,y ) when the player click somewhere inside the f11 map.

this is what i have so far:

function onMapShow(key, keystate)
if keystate == "down" then
if isPlayerMapVisible () then
showCursor(true)
else
showCursor(false)
end
end
end
 
bindKey ( "F11", "down", onMapShow)
 
function mapclick(button, state, x, y)
if state == "down" then
if isPlayerMapVisible () then
local minX, minY, maxX, maxY = getPlayerMapBoundingBox ()
if x >= minX and x <= maxX then
--HERE I WANT TO GET THE WORLD POSITION
end
end
end
end

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...