Code:
// CA HACK.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include <windows.h>
#include <shellapi.h>
#pragma comment(lib,"shell32.lib")
void __cdecl PushToConsole( const char* szCommand )
{
DWORD L***ient = ( DWORD* )( 0x3776FCC8 );
void* CONoff = ( void* )*( DWORD* )( L***ient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void MemCopy(void* Dest, const void* Src, int Len)
{
DWORD OldProtect;
DWORD OldProtect2;
VirtualProtect(Dest, Len, PAGE_EXECUTE_READWRITE, &OldProtect);
memcpy(Dest, Src, Len);
VirtualProtect(Dest, Len, OldProtect, &OldProtect2);
FlushInstructionCache(GetCurrentProcess(), Dest, Len);
}
void main()
{
if(GetAsyncKeyState(VK_NUMPAD0 )<0){
if(spread){
PushToConsole("PerturbRotationEffect 3.000000");
PushToConsole("PerturbIncreaseSpeed 3.000000");
PushToConsole("PerturbDecreaseSpeed 9.000000");
PushToConsole("PerturbWalkPercent 0.500000");
spread = false;
} else {
PushToConsole("PerturbRotationEffect 0.000000");
PushToConsole("PerturbIncreaseSpeed 0.000000");
PushToConsole("PerturbWalkPercent 0.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
spread = true;
}
}
// No Spread Hotkey: NUMPAD 0
if(GetAsyncKeyState(VK_NUMPAD1)<0){
if(boxes){
PushToConsole("ModelDebug_DrawBoxes 0");
PushToConsole("SkelModelStencil 0");
boxes = false;
} else {
PushToConsole("ModelDebug_DrawBoxes 1");
PushToConsole("SkelModelStencil 1");
boxes = true;
}
}
// Boxes/Chams Hotkey: NUMPAD 1
if(GetAsyncKeyState(VK_NUMPAD2)<0){
if(fog){
PushToConsole("FogEnable 1");
fog = false;
} else {
PushToConsole("FogEnable 0");
fog = true;
}
}
//NO FOG Hotkey: NUMPAD 2
if( GetAsyncKeyState( VK_SHIFT ) < 0 )
{
this->PushToConsole("BaseMoveAccel 4000.000000");
this->PushToConsole("StartAccel 4000.000000");
this->PushToConsole("MaxAccel 4000.000000");
this->PushToConsole("AccelInc 4000.000000");
this->PushToConsole("WalkVel 4000.000000");
this->PushToConsole("FRunVel 4000.000000");
this->PushToConsole("BRunVel 4000.000000");
this->PushToConsole("SRunVel 4000.000000");
}else{
this->PushToConsole("BaseMoveAccel 3000.000000");
this->PushToConsole("StartAccel 500.000000");
this->PushToConsole("MaxAccel 3000.000000");
this->PushToConsole("AccelInc 6000.000000");
this->PushToConsole("WalkVel 70.000000");
this->PushToConsole("FRunVel 285.000000");
this->PushToConsole("BRunVel 285.000000");
this->PushToConsole("SRunVel 285.000000");
}
//Speed Hack Hotkey:SHIFT
i dont know if it will not
what do i need to do so?
thanks in ADV.