Hi
This is my code -
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 *LTClient = ( DWORD* )( 0x3778CFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main()
{
while(true)
{
//Chams
PushToConsole("SkelModelStencil -1");
//Spread
PushToConsole("PerturbRotationEffect 0.000000" );
PushToConsole("PerturbIncreaseSpeed 0.000000" );
PushToConsole("PerturbWalkPercent 0.000000" );
PushToConsole("PerturbFiringIncreaseSpeed 0.000000" );
PushToConsole("PerturbRecoil 0.000000" );
PushToConsole("FireMovePerturb 0.000000" );
PushToConsole("ZoomedFireMoveDuckPerturb 0.000000" );
PushToConsole("ZoomedFireMovePerturb 0.000000" );
PushToConsole("ZoomedFireDuckPerturb 0.000000" );
//Reload
PushToConsole("ReloadSpeed 0.000000" );
//Fog
PushToConsole("FogEnable 1" );
}
}
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
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;
}
My hack D/C's after about one minute. Is it that I don't have the right addresses??
While my hack is running though, every thing except instant-reload works, so yeah.
P.S How can I set no recoil? It's not covered in my no spread.
Sorry for nooby questions, maybe I should just stick to playing.