zMpyster Posted January 6, 2019 Share Posted January 6, 2019 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
DNL291 Posted January 6, 2019 Share Posted January 6, 2019 (edited) Verifica se é o jogador local: function abrirMenu(player, dim) if player == localPlayer and dim then abrirPainel() end end addEventHandler("onClientMarkerHit", mercado, abrirMenu) Próxima vez lembre-se de postar na seção Portuguese / Português Edited January 6, 2019 by DNL291 1 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