Jump to content

Static Map with blips


benwilkins

Recommended Posts

I am just thinking about a new idea that I thought up.

A command to pop up a gui window, and a map inside. The map image will have icon images of players locations, I dont want to use the F11 map which would be easy, because that already has a tonne of blips on or other things.

I know the map will be made with:

guiCreateStaticImage ( 10, 30, 500, 500, "map.jpg", false, window)  

I have thought of every possible situation, and I cant seem to work it out how to convert player x,y,z into static screen x,y,z for the image icon locations. I dont think it is possible. What do you guys think?

Link to comment

Wow.. Some awesome maths right there!

  
                local x, y = getElementPosition(elem) 
        x = math.floor((x + 3000) * g_MapSide / 6000) - 4 
        y = math.floor((3000 - y) * g_MapSide / 6000) - 4 
        guiSetPosition(player.gui.mapBlip, x, y, false) 
  

Thanks alot, I forgot all about the map in freeroam, I dont use the resource :P

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...