Seeroy Posted July 5, 2022 Share Posted July 5, 2022 Hello. I`m writing login/register plugin using CEF. But i cant load local page to WebBrowser (but, for example, i can load youtube.com) My code local screenWidth, screenHeight = guiGetScreenSize() local webBrowser = createBrowser(screenWidth, screenHeight, false, false) function webBrowserRender() dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) end addEventHandler("onClientBrowserCreated", webBrowser, function() loadBrowserURL(webBrowser, "http://mta/local/web/index.html") addEventHandler("onClientRender", root, webBrowserRender) end ) Thank you Link to comment
Seeroy Posted July 5, 2022 Author Share Posted July 5, 2022 I fixed this. In this code 3 argument replace false to true) Before: local webBrowser = createBrowser(screenWidth, screenHeight, false, false) After: local webBrowser = createBrowser(screenWidth, screenHeight, true, false) This argument means: isLocal 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