Jump to content

Problema com GUI


zMpyster

Recommended Posts

function abrirPainel()
	guiSetVisible(janela2, not guiGetVisible(janela2))
	showCursor(guiGetVisible(janela2))
end

function click()
	if source == fecharmercado then
		abrirPainel()
	end
end
addEventHandler("onClientGUIClick", resourceRoot, click)

local mercado = createMarker(726.701, -1276.13, 13.648 -1, "cylinder", 1.5, 255, 255, 255)
local mercado2 = createBlip(726.701, -1276.13, 13.648, 61)

function abrirMenu(player, dim)
    if player and isElement(player) and getElementType(player) == "player" and dim then
		abrirPainel()
	end
end
addEventHandler("onClientMarkerHit", mercado, abrirMenu)

Estou tendo um problema quando o player passa na marker automaticamente abre o GUI para todos os players no server, alguém pode me ajudar??

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