your code is all messed up and its gonna lag to hell n back...here i'll try n help a bit. i added glass walls to your code too btw (its my fav hack lol)
i didn't do the whole code, but you should get it from what i did...i'm too lazy to do all the work for you
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* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main()
{
bool recoil = false, walls = false, fog = false, sway = false, blood = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD0)<0){
walls = !walls;
if(walls){
memcpy((LPVOID)0x57207A, "\x6A\x01", 2);
} else {
memcpy((LPVOID)0x57207A, "\x6A\x00", 2);
}
Sleep(150)
}
if(GetAsyncKeyState(VK_NUMPAD1)<0){
recoil = !recoil;
if(recoil){
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" );
} else {
Put Normal Values for Recoil in PTC format HERE! (idk the original Values
}
Sleep(150)
}
if(GetAsyncKeyState(VK_NUMPAD1)<0){
fog = !fog;
if(fog){
PushToConsole("FogEnable 0");
} else {
PushToConsole("FogEnable 1");
}
Sleep(150)
}
if(GetAsyncKeyState(VK_NUMPAD2)<0){
sway = !sway;
if(sway){
PushToConsole("WeaponSway 0.000000" )
} else {
NORMAL WeaponSway In PTC Format Goes here
}
Sleep(150)
}
PushToConsole("WhiteBlood 1" );Numpad 4
{
}
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;
}