neyo- Posted August 7, 2019 Posted August 7, 2019 (edited) Guys, i can't find the problem , help me, the problems repeating value, i can't close the dx panel. @50p or other help. value = 1 function panel() for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do x1, y1, z1 = getElementPosition ( vehicle ) x2, y2, z2 = getElementPosition ( localPlayer ) x3, y3, z3 = getCameraMatrix() -- Get local players position. local distanceBetweenPoints = getDistanceBetweenPoints3D(x1, y1, z1, x3, y3, z3) if(distanceBetweenPoints < 25 and value == 1) then addEventHandler("onClientRender", root, webBrowserRender) showCursor(true) showChat(false) setPedAnimation(localPlayer,"ped","xpressscratch") loadBrowserURL(webBrowser, "http://mta/local/index.html") focusBrowser(webBrowser) elseif distanceBetweenPoints < 25 and value == 0 then removeEventHandler("onClientRender", root, webBrowserRender) removeEventHandler("onClientRender", root, mOS) showCursor(false) showChat(true) value = 1 end end end bindKey("J","down",panel) Edited August 7, 2019 by neyo-
DNL291 Posted August 8, 2019 Posted August 8, 2019 This code doesn't seem to make sense, what are you trying to achieve? Please do not PM me with scripting related question nor support, use the forums instead.
neyo- Posted August 8, 2019 Author Posted August 8, 2019 (edited) 52 minutes ago, DNL291 said: This code doesn't seem to make sense, what are you trying to achieve? When i press again the key, i want to close the browser, but can't closing. i'm going to will send you my full code. here's browser. @DNL291 local screenW, screenH = guiGetScreenSize() local webBrowser = createBrowser(screenW, screenH, true, false) function webBrowserRender() dxDrawImage(screenW * 0.6977, screenH * 0.5273, screenW * 0.2599, screenH * 0.4596, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) end Edited August 8, 2019 by neyo-
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