the easiest method is using it like this
Code:
typedef void (*SendConsoleCommand_)(int a1, char *command);
SendConsoleCommand_ SendConsoleCommand = (SendConsoleCommand_)0x457290;
then call it in your renderer like this
Code:
SendConsoleCommand(0, "god\n");
you can also let your game create a console so you can use that for
input commands
call this one time
Code:
HANDLE hCon;
void BuildDebugConsole(void)
{
AllocConsole();
hCon = GetStdHandle(STD_INPUT_HANDLE);
SetConsoleTitle("Console");
}
Code:
char* buffer = new char[];
void SendCommand()
{
DWORD* tmpSize = new DWORD;
ReadConsole(hCon, buffer, 16*sizeof(buffer), tmpSize, NULL);
SendConsoleCommand(0, buffer);
}
call this in your renderer
Code:
if(GetAsyncKeyState(VK_KEY)&1){bConsole = !bConsole;}
if(bConsole)
{
SendCommand();
bConsole = false;
}