Jump to content

Recommended Posts

Posted (edited)

Hello guys. I'm making an administrative console and I'm using JS/CEF.

The thing is, when I open a CEF, I use:

mp.events.add("openCef", (cefName) => {
	mp.players.local.clearTasksImmediately();
	if(!cefBrowser) {
		cefBrowser = mp.browsers.new("package://cef/"+cefName+".html");
		mp.gui.cursor.visible = true;
	}
});

When I type a 'T' on an input of my CEF, the chatbar shows and all goes buggy. I tried this:

// On openCEF event
mp.gui.chat.activate(false);

// On closeCEF event
mp.gui.chat.activate(true);

But if I do that, the mouse is hidden and CEF becomes unusable.

Are this two events incompatible? Or there's another way to prevent chat coming up when a CEF is called?

Thanks in advice!

 

SOLVED, PLEASE CLOSE

Edited by hdrtop
solved

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