iKaio0991 Posted May 31, 2020 Share Posted May 31, 2020 (edited) Hi I made this code for the server to communicate with the client but they do not communicate. Client: local screenW, screenH = guiGetScreenSize() local browser = guiCreateBrowser( screenW * 0.7853, screenH * 0.3594, screenW * 0.2277, screenH * 0.3125, true, true, false) local theBrowser = guiGetBrowser( browser ) addEvent("mostrarJanelaGangster", true) addEventHandler("mostrarJanelaGangster", getRootElement(), function ( ... ) loadBrowserURL( theBrowser, "http://mta/pickups_e_markers_das_bases/window_gang.html" ) end) Server: function criarMarkerGang( x, y, z ) marker = createMarker(x, y, z , "cylinder", 1, 255, 255, 255, 255) return marker end mkg1 = criarMarkerGang(1761.84765625, -1921.3272705078, 22.555364608765) addEventHandler("onMarkerHit", mkg1, function() triggerClientEvent(source, "mostrarJanelaGangster") end) Edited May 31, 2020 by iKaio0991 Link to comment
MrKAREEM Posted June 1, 2020 Share Posted June 1, 2020 local screenW, screenH = guiGetScreenSize() local browser = guiCreateBrowser( screenW * 0.7853, screenH * 0.3594, screenW * 0.2277, screenH * 0.3125, true, true, false) local theBrowser = guiGetBrowser( browser ) addEvent("mostrarJanelaGangster", true) addEventHandler("mostrarJanelaGangster", root, function ( ) loadBrowserURL( theBrowser, "http://mta/pickups_e_markers_das_bases/window_gang.html" ) end) function criarMarkerGang( x, y, z ) marker = createMarker(x, y, z , "cylinder", 1, 255, 255, 255, 255) return marker end mkg1 = criarMarkerGang(1761.84765625, -1921.3272705078, 22.555364608765) addEventHandler("onMarkerHit", marker, function(element) if element and element == source then triggerClientEvent(source, "mostrarJanelaGangster",source) end end) 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