Okay Im using this:
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void __cdecl PushToConsole(const char* szCommand )
{
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( 0x3781CE30 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
}
void main()
{
bool framespersecond = false;
while(true)
{
if(GetAsyncKeyState(VK_HOME)<0){ // Fps
if(framespersecond){
PushToConsole("ShowFps 0");
framespersecond = false;
} else {
PushToConsole("ShowFps 1");
framespersecond = true;
}
}
}
Sleep(350);
}
DWORD WINAPI dwHackThread(LPVOID) {
while( !IsGameReadyForHook() )
Sleep(300);
main();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
{
return TRUE;
}
}
But the PushToConsole Method is detected, can anyone give me new method ?
BTW: The LTClient is the current one of CShell.dll for europe