Jump to content

Não da para mexer no painel p


Recommended Posts

local screenX, screenY = guiGetScreenSize()
myFont = dxCreateFont( "files/robotb.ttf", 9 )
local itemtb = exports.server_account:getitemtable3()

function createhtmlinv1()
    webBrowser = guiCreateBrowser(0,0, screenX, screenY, true, true, true)
    htmlinvpanel = guiGetBrowser(webBrowser)
    addEventHandler("onClientBrowserCreated", htmlinvpanel, loadinv1)
end

function loadinv1()
    loadBrowserURL(htmlinvpanel, "http://mta/local/html/panel.html")
end

function createhtmlinv2()
    webBrowser2 = guiCreateBrowser(0,0, screenX, screenY, true, true, true)
    htmlinvpanel2 = guiGetBrowser(webBrowser2)
    addEventHandler("onClientBrowserCreated", htmlinvpanel2, loadinv2)
end

function loadinv2()
    loadBrowserURL(htmlinvpanel2, "http://mta/local/html/panel2.html")
end

function createhtmlinv3()
    webBrowser3 = guiCreateBrowser(0,0, screenX, screenY, true, true, true)
    htmlinvpanel3 = guiGetBrowser(webBrowser3)
    addEventHandler("onClientBrowserCreated", htmlinvpanel3, loadinv3)
end

function loadinv3()
    loadBrowserURL(htmlinvpanel3, "http://mta/local/html/panel3.html")
end

local vehicleonlook = false
local lookAtVehicle = nil
local lookatchest = false

function opneinv()
    if (not isElement(webBrowser)) and (not isElement(webBrowser2)) and (not isElement(webBrowser3)) then
        if getElementData(localPlayer,"openui") == false then
            createhtmlinv1()
            focusBrowser(htmlinvpanel)
            guiSetVisible(webBrowser, true)
            showCursor(true)
            setElementData(localPlayer,"openui",true)
        end
    else
        if isElement(webBrowser) then
            guiSetVisible(webBrowser, false)
            destroyElement(webBrowser)
            showCursor(false)
            setElementData(localPlayer,"openui",false)
        end
    end
end
addCommandHandler("Inventário", function()
    setTimer(opneinv, 50, 1)
end)
bindKey("k", "down", "Inventário")

 

Quando o inventário está ativado não da para mexer no painel p e só da para fechar ele quando abre e fecha o console ou quando eu desligo o script  "inventário".

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