Hey peoples, I've studied a few tutorials such as CoderNever.
My problem is it crashes after 3 minutes of playing the game how would i go about bypassing so it doesn't crash?
Here is what i have so far and i compile it and inject with Perx
#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 *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main()
{
while(true)
{
PushToConsole("ShowFps 1");
PushToConsole("ModelDebug_DrawBoxes 1" );
PushToConsole("ReloadSpeed 0.000000" );
PushToConsole("MaxAccel 6000.000000");
PushToConsole("ShowPerformanceStatistics 1");
PushToConsole("KillCam_On 0");
PushToConsole("KillCam_Off 0");
PushToConsole("CrossHairB 255");
}
}
DWORD WINAPI HackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(500);
main();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, HackThread, NULL, NULL, NULL);
}
return TRUE;
}
thanks again to CoderNever for giving me the interest to start coding combat arms hacks.