Hey Everyone, I was creating my own framework from scratch, and I wanted to use CEFs as HUD's and obviously Login pages and stuff
As I was going through, I wrote the perfect browser manager for myself,
But for some reason, my events from the JS to LUA are not being triggered,
Even tho I opened the dev console, and I saw that "window.mta" with the "triggerEvent" function inside that exists.
So Idk, is this normal to not be able to trigger an event on a remote URL?
And if not, I was thinking about the structure of how it should be,
I know that if it's true, then I should be able to load my login/huds of the browsers somehow and let them connect to the server as well
First Solution:
- Load the remote login page -> React web page API calls to Backend -> Backend talks to MTA Server
But obviously, how? The MTA doesn't provide us with any resources to at least create an API server on a server-side resource, so we can manage that, and it's impossible
Or maybe you have an idea about what I can do in this solution
2nd Solution:
- Load a local HTML Page that has an iframe inside it, set the iframe to max width and max height, load a JS file as well, and inside that JS file, provide a bunch of functions written, such as loadURL to change the URL of that iframe, etc.
Now this custom HTML loads, works (at least fine, I have to change my frontend obviously, do not know if it's good to use for HUD's either. But it works, and in this solution, as I am writing this, I can't feel sorry for myself,
But I don't know how to load that HTML File XD
I have a resource called "[core]", inside this has a folder of resources called "browser", and inside that we have a folder called "ui" with index.html and other files inside it.And I have no idea how to load it, or even how the loading of the JS scripts should be written inside it
If you can help me with my solution, and recommend me a way via this solution, I would appreciate it.