Console Opening Detection

I was wondering if it is possible to detect to see if your client opened up the default console. I know this is possible with modules, but I want to do it without modules. I’ve tried many things, and just can’t figure out a way. Maybe you guys can help. Thanks. P.S. Need help ASAP.

This is not possible via the server.

It is if you have the clientside lua tell the server about it.

Yea but it cannot be verified on the server.

You could do it numerous ways. For example, HUDPaint doesn’t get called while the menu is open. You could also hook into key presses and find out when the console key is pressed. So on so forth.

@zzaacckk: Please stop.

Okay, I’ve done some tests to see what I can do. I think the detection of the HUDPaint hook would be a good way to go about this. I’m having some trouble detecting when the hook is not called to display.

Run a parallel think hook and check times between calls.

HUDPaint is’nt called during the time you prees Esc, opening the menu aswell though

So then instead of someone opening console, they may just be pressing Esc in which case it wouldn’t be the correct choice?

Correct me if I’m wrong please :slight_smile:

EDIT
Don’t just rate me Dumb, please give an explanation as to why you think it -.-

Could always be done with a module.


LUA_FUNCTION( IsConsoleVisible )
{
	gLua->Push( (bool) g_ClientEngine->Con_IsVisible() );
	return 1;
}

I know he said he didn’t want it, but meh.

would prolly be easier

For clientside everyone would have to install the module though?

the server uses the module to see if there console is open. The clients dont need the module, only the server.