[Help]Send Command To Console Function

Posts 1–11 of 11 · Page 1 of 1
[Help]Send Command To Console Function
hey guys i need some help from you cause i want to make a send command to console function xD
but im not pro so i get an error!
Which is: GAME CRASH!

Well i tried to use the hahaz's function that i saw here, but its the same
Now im using this:
Code:
static DWORD sndTc = 0x4CA0F0;

void SendCommand(char *command)
{
       _asm{
            push command
            push 1
            call sndTc
       }
}
As i said above im not pro so please don't be so rude like other persons do.
[html]DWORD dwCall = MelEngine.Cmd;
__asm
{
PUSH dCmd;
PUSH 0;
PUSH 0;
CALL dwCall;
ADD ESP, 0x0C;
}[/html]

Enjoy Yourself.
Quote Originally Posted by Melodia View Post
[html]DWORD dwCall = MelEngine.Cmd;
__asm
{
PUSH dCmd;
PUSH 0;
PUSH 0;
CALL dwCall;
ADD ESP, 0x0C;
}[/html]

Enjoy Yourself.
idk, maybe you will laugh for my question but.....MelEngine.Cmd?? if you can explain, or should i replace it with the Send Command To Console function offset? please!
Same Thing, Mine just uses a SigScan.
Quote Originally Posted by Melodia View Post
Same Thing, Mine just uses a SigScan.
Well, if i recieved your message then i think that its no needed to add a offset?
~Sighs.

You need everything done for you don't yas ?

[html]void SendCommandToConsole(char * dCmd)
{
DWORD dwCall = 0x4CA0F0;
__asm
{
PUSH dCmd;
PUSH 0;
PUSH 0;
CALL dwCall;
ADD ESP, 0x0C;
}
}
[/html]
That's what I Meant was good for you.
Quote Originally Posted by Melodia View Post
~Sighs.

You need everything done for you don't yas ?

[html]void SendCommandToConsole(char * dCmd)
{
DWORD dwCall = 0x4CA0F0;
__asm
{
PUSH dCmd;
PUSH 0;
PUSH 0;
CALL dwCall;
ADD ESP, 0x0C;
}
}
[/html]
That's what I Meant was good for you.

Well, thanks, tbh, i already tried it but it crashes again -.-", huh?
OK, anyway thanks!
PS:
its the first time that you didn't insult me in one of my posts!
It is crashing because you (usually) need to call this in an engine function (EndFrame or RenderScene) otherwise it causes a race condition and crashes

ps.

i use this
Code:
typedef void (__cdecl *tSendCommandToConsole)(int a1, int a2, char *cvar);
tSendCommandToConsole oSendCommandToConsole = 0x4CA0F0;

EndframeDetour( )
{
oSendCommandToConsole(1, 1, "cg_DrawFPS 1");
}
Quote Originally Posted by user590177 View Post
Well, thanks, tbh, i already tried it but it crashes again -.-", huh?
OK, anyway thanks!
PS:
its the first time that you didn't insult me in one of my posts!
Check the Addie and the rest of your thingies, Function's Good.

If you can't manage to get it working, Leave ASM as you don't understand it and use the cpp Push one witch is public.
WELL!
THANKS A LOT!!!!
I WILL NEVER FORGET YOUR HELP!
if i hoocked IDirect3DDevice9::EndScene()
can i use you function of inputing commands?
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us