First you will need to read this guide by CoderNever - https://www.mpgh.net/forum/207-combat...arms-hack.html
You'll end up with a source code like this
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()
{
while(true)
{
PushToConsole("SkelModelStencil 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;
}
As you can see it won't work as it's got an old LTC
A hack won't run without the LTC
The most current one is - 0x377ED910
With ever patch the LTC and other addresses will be changed.
You'll have to wait or ask another coder for the newly updated address
To update the LTClient you have to change this part of the code
Code:
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
With the newly updated LTC it will be
Code:
DWORD *LTClient = ( DWORD* )( 0x377ED910 );
The whole source will then end up like this
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* )( 0x377ED910 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main()
{
while(true)
{
PushToConsole("SkelModelStencil 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;
}
After you've released your first hack or used for personal interest you'll want to add more features.
The full tutorial is here - https://www.mpgh.net/forum/207-combat...auto-hack.html
After you've read that you should get this.
If I wanted to add these features
- FPS
- No Fog
- Weapon Activation
- No Spread
I would have to change this in our first source
Code:
{
PushToConsole("SkelModelStencil 1");
}
}
And add the PushToConsole sources
Which are
- FPS
Code:
PushToConsole("ShowFps 1");
- No Fog
Code:
PushToConsole("FogEnable 1" );
- Weapon Activation
Code:
PushToConsole("ActivationDistance 999999" );
- No Spread
Code:
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" );
So in final our PushToConsole code's will end up like this
Code:
{
PushToConsole("SkelModelStencil 1");
PushToConsole("ShowFps 1");
PushToConsole("FogEnable 1" );
PushToConsole("ActivationDistance 999999" )
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" );
}
}
And in finally our whole source will end up like this
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* )( 0x377ED910 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main()
{
while(true)
{
PushToConsole("SkelModelStencil 1");
PushToConsole("ShowFps 1");
PushToConsole("FogEnable 1" );
PushToConsole("ActivationDistance 999999" )
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" );
}
}
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;
}
So in total all you need to do to update your hack is to update the latest LTC
Code:
DWORD *LTClient = ( DWORD* )( 0x377ED910 );
Credit's
- Topblast
- Spook
- CoderNever
- DeadLinez
- CodeDemon