Jump to content

GuiBrowser related problem.


Neproify

Recommended Posts

Hello. I created GuiBrowser for my login. It works good, but i have small problem with it. It doesn't take mouse and keyboard input from player. I need to restart resource(auth in my case), and then it takes input again. Can anyone help me?

  
local loginWindow = nil 
local screenWidth, screenHeight = guiGetScreenSize() 
  
addEventHandler("onClientResourceStart", resourceRoot, function() 
    setDevelopmentMode(true, true) 
    setPlayerHudComponentVisible("all", false) 
  
    loginWindow = GuiBrowser(screenWidth / 2 - 150, screenHeight / 2 - 150, 300, 300, true, true, false) 
    addEventHandler("onClientBrowserCreated", loginWindow, function() 
        loginWindow:getBrowser():toggleDevTools(true) 
        loginWindow:getBrowser():loadURL("http://mta/local/login.html") 
        showCursor(true) 
        guiSetInputEnabled(true) 
    end) 
end) 
  

Link to post

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...