Results 1 to 14 of 14
  1. #1
    khaozizleet's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Blah

    PTC Method wrong?

    Just can't seem to get this PTC (RCC) method to work, no matter what I do. I have the update Engine LTC, looked myself as well. Nothing is happening in game when trying to activating (I know it is reaching there as well).

    Engine LTC wrong? PTC Method "patched." Something I'm just missing?

    Code:
    #include "stdafx.h"
    #include <tlhelp32.h>
    
    #define ENGLT 0x485E10
    
    bool charPress, ptcFPS;
    
    bool IsGameReadyForHook()
    {
    	if( GetModuleHandleA( "d3d9.dll" ) != NULL 
    		&& GetModuleHandleA( "ClientFX.fxd" ) != NULL 
    		&& GetModuleHandleA( "CShell.dll" ) != NULL )
    		return true;
    
    	return false;
    }
    
    void RunConsoleCommand(char *command)
    {
    	typedef int (__cdecl* RunConsoleCommand_t)(char *cmd);
    	RunConsoleCommand_t pRunConsoleCommand = (RunConsoleCommand_t) ENGLT;
    	pRunConsoleCommand(command);
    	delete command;
    }  
    
    DWORD __stdcall Keys(LPVOID)
    {
        for(;;Sleep(20))
        {
    		if (GetAsyncKeyState(VK_NUMPAD0))
                   {
    			ptcFPS = !ptcFPS;
    			charPress = true;
    		}
    	}
    }
    
    
    DWORD __stdcall Hacks(LPVOID)
    {
    
    	while(!IsGameReadyForHook() ) 
    	{
    		Sleep(150);
    	}
    
    
        for(;;Sleep(20))
        {
    		if (charPress)
    		{
    			if (ptcFPS)
    			{
    				RunConsoleCommand("ShowFps 1");
    			}
    			else
    			{
    				RunConsoleCommand("ShowFps 0");
    			}
    			charPress = false;
    		}
    	}
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    
    	if ( dwReason == DLL_PROCESS_ATTACH )
    	{
    		ltFound = true;
    		ptcFPS = false;
    		charPress = false;
    		CreateThread(NULL, NULL, Keys, NULL, NULL, NULL);
    		CreateThread(NULL, NULL, Hacks, NULL, NULL, NULL);
    	}
    	return true;
    }

  2. #2
    Fabolous's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    192.168.1.01
    Posts
    2,706
    Reputation
    261
    Thanks
    682
    My Mood
    Paranoid
    Your Engine LTC is wrong. I'm not sure but some one posted the real one here before /

  3. The Following User Says Thank You to Fabolous For This Useful Post:

    khaozizleet (12-11-2010)

  4. #3
    khaozizleet's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Blah
    Quote Originally Posted by UnknownCoder View Post
    Your Engine LTC is wrong. I'm not sure but some one posted the real one here before /

    Thank you. I have seen that posted several places (and even looked myself), but I guess it's the wrong one, not sure which one I'm suppose to look at.

    EDIT: I just tried 5 different addresses I found. I have no idea where exactly the "correct" address is, and I've tried looking a tutorials such as This to find the Engine LTC.

    Is there something I should be looking for to determine the exact value?
    Last edited by khaozizleet; 12-11-2010 at 01:11 PM.

  5. #4
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    You need to also call it from inside a hooked directx function.

  6. #5
    wicho_koz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    194
    Reputation
    12
    Thanks
    52
    My Mood
    Shocked
    it works for me:

    //ptc method
    typedef int (__cdecl* RunConsoleCommand_t)(char* cmd);
    RunConsoleCommand_t PushToConsole = (RunConsoleCommand_t)0x485E10;

    how to use:
    if(Fps) {
    PushToConsole("ShowFps 1");
    }else{
    PushToConsole("ShowFps 0");
    }


    thanks me!

  7. #6
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    661
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    Quote Originally Posted by wicho_koz View Post
    it works for me:

    //ptc method
    typedef int (__cdecl* RunConsoleCommand_t)(char* cmd);
    RunConsoleCommand_t PushToConsole = (RunConsoleCommand_t)0x485E10;

    how to use:
    if(Fps) {
    PushToConsole("ShowFps 1");
    }else{
    PushToConsole("ShowFps 0");
    }


    thanks me!
    did you even read his code you noob?? all you did was copy and paste shit you didn't write and expect thanks for it..

    @ khaos all you have to do is update the address and call the function within one of the games functions like crash said. I would suggest hooking present since hooking endscene without detouring is detected.

  8. #7
    khaozizleet's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Blah
    Quote Originally Posted by swatfx View Post
    did you even read his code you noob?? all you did was copy and paste shit you didn't write and expect thanks for it..

    @ khaos all you have to do is update the address and call the function within one of the games functions like crash said. I would suggest hooking present since hooking endscene without detouring is detected.
    Lol....I have practically the exact of what that dude said in my code.

    I'll have to look around at hooking functions, I'm new to this whole scene if you can't tell, but I'm guessing it won't be horribly hard.

  9. #8
    Fabolous's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    192.168.1.01
    Posts
    2,706
    Reputation
    261
    Thanks
    682
    My Mood
    Paranoid
    Reply if it does not work hooking in EndScene.

  10. #9
    Synns's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    5,176
    Reputation
    170
    Thanks
    2,554
    My Mood
    Bitchy
    But EndScene and Present are both called every frame, wouldn't that cause lag?

  11. #10
    _Fk127_'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    724
    Reputation
    16
    Thanks
    208
    My Mood
    Bitchy
    Quote Originally Posted by Tyrannus View Post
    But EndScene and Present are both called every frame, wouldn't that cause lag?
    They do cause lag.



    Put this image in your signature if you support HTML5 development!

  12. #11
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    661
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    Quote Originally Posted by Tyrannus View Post
    But EndScene and Present are both called every frame, wouldn't that cause lag?
    that's why you only push the command once, or it does cause lag.

  13. #12
    _Fk127_'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    724
    Reputation
    16
    Thanks
    208
    My Mood
    Bitchy
    Quote Originally Posted by swatfx View Post
    that's why you only push the command once, or it does cause lag.
    And how is this accomplished



    Put this image in your signature if you support HTML5 development!

  14. #13
    Departure's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    818
    Reputation
    125
    Thanks
    1,785
    My Mood
    Doh
    have a boolean type and when you interact with your menu or hotkey or whatever set this boolean type to true, then in present if boolean = true then process else do nothing, if it is true then at the end of processing set the boolean back to false
    Last edited by Departure; 12-11-2010 at 08:28 PM.

  15. #14
    khaozizleet's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    0
    My Mood
    Blah
    I've been using a base from someone named "Kotentopf", and it uses a hook function for D3DX9. This PTC method still isn't working in that, using it's find address set of functions.