PTC Method wrong?

Posts 114 of 14 · Page 1 of 1
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;
}
Your Engine LTC is wrong. I'm not sure but some one posted the real one here before /
Quote Originally Posted by Fabolous 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?
You need to also call it from inside a hooked directx function.
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!
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.
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.
Reply if it does not work hooking in EndScene.
But EndScene and Present are both called every frame, wouldn't that cause lag?
Quote Originally Posted by Synns View Post
But EndScene and Present are both called every frame, wouldn't that cause lag?
They do cause lag.
Quote Originally Posted by Synns 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.
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
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
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.
Posts 114 of 14 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?