XeRo Posted August 16, 2015 Share Posted August 16, 2015 Hi Guys Please Fix GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(x, y, z, z2, "Home", true) end ) local theBrowser = guiGetBrowser(browser) -- Get the browser element from gui-browser addEventHandler("onClientGUIClick", theBrowser, function() if theBrowser == GUIEditor.button[1] then loadBrowserURL(source, "https://www.youtube.com") end ) Link to comment
t3wz Posted August 16, 2015 Share Posted August 16, 2015 You're trying to inject clicks in the browser? if so... injectBrowserMouseMove injectBrowserMouseDown injectBrowserMouseUp Link to comment
XeRo Posted August 16, 2015 Author Share Posted August 16, 2015 Is it OK ?? addEventHandler("onClientClick", root, function(button, state) if state == GUIEditor.button[1] then injectBrowserMouseDown(browser, button) loadBrowserURL(source, "www.mtasa.com") end ) Link to comment
LoOs Posted August 16, 2015 Share Posted August 16, 2015 You did not create the browser , ! Link to comment
XeRo Posted August 16, 2015 Author Share Posted August 16, 2015 hahaha lol sorry local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false) Link to comment
t3wz Posted August 16, 2015 Share Posted August 16, 2015 (edited) Is it OK ?? state will always be a string (up or down) then you can't compare a string with an element, also you have to use injectBrowserMouseMove. Edited August 16, 2015 by Guest Link to comment
LoOs Posted August 16, 2015 Share Posted August 16, 2015 addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then loadBrowserURL(browser, "www.mtasa.com") end end ) Link to comment
XeRo Posted August 16, 2015 Author Share Posted August 16, 2015 I know this function. Button clicking new Site load Browser! I want 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