Ok here it is:
[php]#include <windows.h>
#define LTClient 0x37767BD0
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* )( LTClient );
void* CONoff = ( void* )*( DWORD* )( *Ltclient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, -3-1+2+6;
}
}
void main()
{
while(true)
Sleep(100);
{
if(GetAsyncKeyState(VK_INSERT)&1){
{
//No 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");
//No recoil
memcpy((LPVOID)0x3741A700, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A714, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A717, "\x90\x90\x90", 3);
memcpy((LPVOID)0x37418209, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A720, "\x90\x90\x90", 3);
//Removals
PushToConsole("DynamicLight 0");
PushToConsole("EnableWeatherFX 0");
PushToConsole("MuzzleLight 0");
PushToConsole("SnowEnable 0");
PushToConsole("CamDamage 0");
PushToConsole("ModelApplySun 0");
PushToConsole("ClientFXDetailLevel 0");
PushToConsole("ModelShadow_Proj_Enable 0");
PushToConsole("DebrisFXLevel 0");
PushToConsole("ScatterEnable 0");
PushToConsole("modelshadow_proj_blurenable 0");
PushToConsole("DrawAllModelShadows 0");
PushToConsole("ModelShadow_Proj_MinColorComponent 0");
PushToConsole("ModelShadow_Proj_MaxProjDist 0");
//No fog
PushToConsole("FogEnable 0");
//NX chams
PushToConsole("SkelModelStencil -1" );
}
else{
//No spread
PushToConsole("PerturbRotationEffect 3.000000");
PushToConsole("PerturbIncreaseSpeed 3.000000");
PushToConsole("PerturbWalkPercent 9.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.500000");
PushToConsole("PerturbRecoil 9.000000");
PushToConsole("FireMovePerturb 9.000000");
PushToConsole("ZoomedFireMoveDuckPerturb 9.000000");
PushToConsole("ZoomedFireMovePerturb 9.000000");
PushToConsole("ZoomedFireDuckPerturb 9.000000");
//No recoil
memcpy((LPVOID)0x3741A700, "\xD8\x66\x54", 3);
memcpy((LPVOID)0x3741A714, "\xD9\x46\x54", 3);
memcpy((LPVOID)0x3741A717, "\xD9\x5E\x54", 3);
memcpy((LPVOID)0x37418209, "\xD9\x46\x48", 3);
memcpy((LPVOID)0x3741A720, "\xD9\x5E\x48", 3);
//Removals
PushToConsole("DynamicLight 1");
PushToConsole("EnableWeatherFX 1");
PushToConsole("MuzzleLight 1");
PushToConsole("SnowEnable 1");
PushToConsole("CamDamage 1");
PushToConsole("ModelApplySun 1");
PushToConsole("ClientFXDetailLevel 1");
PushToConsole("ModelShadow_Proj_Enable 1");
PushToConsole("DebrisFXLevel 1");
PushToConsole("ScatterEnable 1");
PushToConsole("modelshadow_proj_blurenable 1");
PushToConsole("DrawAllModelShadows 1");
PushToConsole("ModelShadow_Proj_MinColorComponent 1");
PushToConsole("ModelShadow_Proj_MaxProjDist 1");
//No fog
PushToConsole("FogEnable 1");
//NX chams
PushToConsole("SkelModelStencil 0" );
{ //Full bright
if(GetAsyncKeyState(VK_NUMPAD2)<0){
{
PushToConsole("FullBright 1");
}
else{
PushToConsole("FullBright 0");
}
}
}
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;
} [/php]

Originally Posted by
Zoom
Did you C&P something?
Well most of the code is from CN's tutorial.