Activating External Console
Here is an easy code to activate the external console. For some reason the game doesn't write anything to it, but it works just fine for executing commands, setting dvars etc.
Code:
void (__cdecl* Sys_ShowConsole)() { reinterpret_cast<decltype(Sys_ShowConsole)>(0x005CB490) };
//somewhere in your hook
static bool showConsole { true };
if (showConsole) {
Sys_ShowConsole();
showConsole = false;
}
Note: You should only call this once. If you don't have a hook where you can call it, create a new thread with a message queue and call it there. The cool thing about that approach is that the game won't exit if you close the console.
Greetings!
I've been struggling with that sub. Called it but the window just flashed by. Your method seems to work, thanks! Can I use it in my tool?
Someone make a .DLL for this.
So does this allow you to put in certain DVARS and not others? Since apparently things like "map mp_afghan" won't work or w/e.
I fixed that, now their is some other errors :u
And where do you put this code please?