Results 1 to 9 of 9
  1. #1
    Headpuster's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    1

    Need help at a PTC Function

    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:

    Code:
    #define ADR_ENGINE						0x485FF0
    
    void CombatArms::ConsolePush(const char *szCommand) {
    	__asm {
    		PUSH szCommand
    		MOV EAX, ADR_ENGINE
    		CALL EAX
    		ADD ESP, 4
    	}
    }
    And the call is:
    Code:
    CombatArms *ca = new CombatArms();
    
    while (true) {
    		if (GetAsyncKeyState(VK_F10)&1) {
    			ca->ConsolePush("ShowFps 1");
    		}
    	}

  2. #2
    wraithkilla's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    257
    Reputation
    10
    Thanks
    905
    My Mood
    Busy
    your call must be hooked or in a hooked function;
    if you wrote it yourself explain the asm ;D;

  3. #3
    Headpuster's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    1
    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

  4. The Following User Says Thank You to Headpuster For This Useful Post:

    wraithkilla (12-30-2011)

  5. #4
    SNIPdetta's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    121
    Reputation
    21
    Thanks
    96
    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);
    }

  6. #5
    Headpuster's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    1
    already get it workin, just forgot this with the hooked functin, but thanks

  7. #6
    striderplus111's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    What on earth are you guys talking about? I feel so inferior to all of you lol

  8. #7
    SNIPdetta's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    121
    Reputation
    21
    Thanks
    96
    Quote Originally Posted by striderplus111 View Post
    What on earth are you guys talking about? I feel so inferior to all of you lol
    talking about how make hacks using console comands.

    you not inferior, you only don't read about how make hacks.

  9. #8
    striderplus111's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    So you guys are making hacks that are usable only through console? or using the console to hack the game?

  10. #9
    wraithkilla's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    257
    Reputation
    10
    Thanks
    905
    My Mood
    Busy
    using the gameconsole for some functions

Similar Threads

  1. [Help Request] Need Help
    By shane11 in forum CrossFire Help
    Replies: 49
    Last Post: 05-03-2011, 04:29 AM
  2. [Help Request] Need help finding a Vindictus injector
    By VpChris in forum Vindictus Help
    Replies: 2
    Last Post: 05-01-2011, 10:51 PM
  3. [Help Request] I need help~~!!!!
    By c834606877 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 1
    Last Post: 05-01-2011, 01:12 AM
  4. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 09:06 PM
  5. Antikick Function, Need Help
    By killerld in forum C++/C Programming
    Replies: 2
    Last Post: 07-27-2009, 08:20 AM