Jump to content

[HELP] click in the map gui


MaRcell

Recommended Posts

local screenx, screeny = guiGetScreenSize()
local sx, sy = (screenx/1920), (screeny/1080)
loadstring(exports.dgs:dgsImportFunction())()

local blip = nil
local blip2 = nil
local width = 700
local height = 700

GangMarcar = dgsCreateWindow((screenx - sx*720)/2, (screeny - sy*810)/2, sx*720, sy*810, "MARQUE UM DESTINO PARA SUA GANG", false, tocolor(0, 0, 0, 255), sy*50, nil, tocolor(0, 255, 255, 150), nil, tocolor(0, 0, 0, 150), sy*5, true)
dgsWindowSetMovable(GangMarcar, false)
dgsWindowSetSizable(GangMarcar, false)
dgsSetVisible(GangMarcar, false)

GangMarcarMap = dgsCreateImage(sx*10, sy*10, width, width, "Images/radar.jpg", false, GangMarcar, tocolor(255,255,255,255))
GangMarcarLabel0 = dgsCreateLabel(sx*10, sy*720, sx*480, sy*20, "BOTÃO DIREITO DO MOUSE PRA TIRAR", false, GangMarcar, tocolor(255, 255, 0, 255), sy*1.5, sy*1.5, sy*1.5, sy*1.5, tocolor(0, 0, 0, 255), "right", "center")
GangMarcarSair = dgsCreateButton(sx*610, sy*720, sx*100, sy*30, "SAIR", false, GangMarcar, tocolor(0, 0, 0, 255), sy*1.5, sy*1.5, nil, nil, nil, tocolor(255, 77, 77, 150), tocolor(255, 0, 0, 150), tocolor(255, 61, 153, 150))

addEventHandler("onDgsMouseClick", getRootElement(), function(button, state, absoluteX, absoluteY)
    if (button == "left" and state == "down") then
        if (source == GangMarcarMap) then

        elseif (source == GangMarcarSair) then
            dgsSetVisible(GangMarcar, false)
            dgsSetEnabled(Gang, true)
            painelsVisivel = nil
        end
    end
end)
Hello guys, my problem is to calculate the click on the gui map with the position of gta
 
 
 
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...