Jump to content
  • 0

MTA WebBrowser


Ben_Sherman

Question

Hello MTA,

I recently created a simple script to opened up a website in game however I noticed that it didn't load it for me. Weirdly enough I got it to work once I manually added it to the allow list. Main question here is the GUI that pops up asking if I want to allow or deny the request bugged or why is it no longer popping up? could it be the fact that my GUI is covering the entire screen or what?

-Sincerely

Link to comment

3 answers to this question

Recommended Posts

  • 0
What parameters do you pass to requestBrowserDomains and what URL do you load then?

Does the webbrowser resource work fine?

why is it no longer popping up?

Did it stop popping up after you manually added it to the allow list or have you always been dealing with this issue?

gui.Rules = guiCreateBrowser(71, 34, (sw*0.5651041666666667), (sh*0.6277777777777778), false, false, false, gui.background) 
     
local theBrowser = guiGetBrowser(gui.Rules) 
addEventHandler("onClientBrowserCreated", theBrowser,  
    function() 
        loadBrowserURL(source, "http://game-center.everest-community.net/law.html") 
    end 
) 

Thats the code, it loads to a law/rule section which is pure html, anyhow once I open the GUI the webbrowser doesn't appear unless I manually add it to the whitelist section in my MTA settings. The window that popped up before saying "Hey do you want to allow or block this domain" no longer pops up. It's when I manually allow it in the whitelist settings I can see the webbrowser itself.

Now the rules is just a webbrowser the reason it's not local is because there are other pages that it can load from there for example my forums an other stuff. Currently it has a background frame around the webbrowser so I don't know if that could be the issue that it's blocking the window that asks you if it the domain should be allowed or blocked.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...