hdrtop Posted April 27, 2020 Posted April 27, 2020 Hello! I’m adding new content to my gamemode and I want to show some variables in a CEF HUD I have done. I’ve created a new browser in Client-Side but I have the variables on the Server-Side. I want to show in a DIV the Admin level, player name, etc. and this variables are stored in server. How I can send the variables to the client-side and then show this variables on my CEF? There’s any good tutorial about CEF? P.S. I’m not using C#, everything is wrote on JS.
Division Posted April 27, 2020 Posted April 27, 2020 there is a "road to follow" You have to go from server -> client -> cef so add an event in clientside and call it from server with ur variables passed mp.events.call("clientSideEvent", myVariables); than in that clientside event you can pass the variables to your cef window with browser.execute(); browser.execute('initializeViewTable(myVariables);'); its could be like an array that u can handle in ur cef function
hdrtop Posted April 28, 2020 Author Posted April 28, 2020 (edited) Yay! Thanks! One question, it's possible that if I have a CEF during the gameplay the Weapon Selector Menu (that comes with default in GTA 5) doesn't shows up? I press TAB but the menu doesn't show... Edit 1: I think it's because displayHud is setted to FALSE automatically when CEF opens. Anyone knows any solution for that? Edit 2: Solved, added mp.game.ui.displayHud(true); when CEF is created Edited April 28, 2020 by hdrtop
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now