your call must be hooked or in a hooked function;
if you wrote it yourself explain the asm ;D;
Hey guys, I'm currently writing a PTC function, the Address for Engine I got from
https://www.mpgh.net/forum/224-combat...12-2011-a.html
but ingame nothing happens:
And the call is:Code:#define ADR_ENGINE 0x485FF0 void CombatArms::ConsolePush(const char *szCommand) { __asm { PUSH szCommand MOV EAX, ADR_ENGINE CALL EAX ADD ESP, 4 } }
Code:CombatArms *ca = new CombatArms(); while (true) { if (GetAsyncKeyState(VK_F10)&1) { ca->ConsolePush("ShowFps 1"); } }
your call must be hooked or in a hooked function;
if you wrote it yourself explain the asm ;D;
ah thank you ->
sure I can explain it:
Push szCommand <- push the command on the stack
mov eax, ADR_ENGINE <- copys the address of engine to eax, cause can't call it direct
call eax <- calls the address with a e9 jump
add esp, 4 <- clears the esp-stackframe
wraithkilla (12-30-2011)
to work:
Code:HRESULT WINAPI myPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion) { while (true) { if (GetAsyncKeyState(VK_F10)&1) { ca->ConsolePush("ShowFps 1"); } } return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); }
already get it workin, just forgot this with the hooked functin, but thanks
What on earth are you guys talking about? I feel so inferior to all of you lol
So you guys are making hacks that are usable only through console? or using the console to hack the game?
using the gameconsole for some functions