Jump to content

[HELP] HTML GUI


syn0nym

Recommended Posts

Hello everyone

I have a problem when i scripting, so i make a gui based from html, the gui running perfectly but when i add a setCameraMatrix on the server side, it not showing.

client

local x, y = guiGetScreenSize()
local browser = guiCreateBrowser(0, 0, x, y, true, true, false)
local theBrowser = guiGetBrowser(browser)

addEventHandler("onClientBrowserCreated", theBrowser, 
function()
    loadBrowserURL(source, "http://mta/local/panel/index.html")
    guiSetVisible(browser, true)
end
)
showCursor(true)

server side

function Start()
    fadeCamera(source, true, 5)
    setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316)
    setPlayerHudComponentVisible(source, "all", false)
end

addEventHandler("onPlayerJoin", root, Start)

 

Link to comment

from personal experience, I do not advise you to use СEF - or to be more precise html interfaces (they are resource-intensive and very buggy since the browser version itself is also old to use).

I talked to a lot of people on this topic and many of them claimed me and even gave many examples that this is really a senseless idea. + also, not everyone can load these interfaces

Edited by marcelluss
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...