ok im sorry to have to ask for help but iv tryed to make my own hot key and you have to hold the key down for the hack to stay on also after one min it crash's
Code:
#include <windows.h>
//Addys Here
#define LTCAddy 0x377ED910
//LTClient Address (Not Alt one)
#define RECOIL1 0x3745FA90
#define RECOIL2 0x37232A69
#define RECOIL3 0x3745FAA4
#define RECOIL4 0x3745FAA7
#define RECOIL5 0x3745FAB0
//Defines
bool Memoria( void * pDest, char * szPatch, size_t sSize ) //Nopping Method
{
DWORD dwOrgProtect = NULL;
if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
return FALSE;
memcpy( pDest, szPatch, sSize );
VirtualProtect( pDest, sSize, dwOrgProtect, NULL );
return TRUE;
}
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)
{
/////////////////////////////////////////////////////////////////////////
if(GetAsyncKeyState(VK_NUMPAD2)<0){
PushToConsole("PerturbRotationEffect 3.000000");
PushToConsole("PerturbIncreaseSpeed 3.000000");
PushToConsole("PerturbDecreaseSpeed 9.000000");
PushToConsole("PerturbWalkPercent 0.500000");
} else {
PushToConsole("PerturbRotationEffect 0.000000");
PushToConsole("PerturbIncreaseSpeed 0.000000");
PushToConsole("PerturbWalkPercent 0.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
}
if(GetAsyncKeyState(VK_NUMPAD3)<0){ // No Recoil
Memoria((LPVOID)(RECOIL1), "\xD8\x66\x54", 3);
Memoria((LPVOID)(RECOIL2), "\xD9\x46\x54", 3);
Memoria((LPVOID)(RECOIL3), "\xD9\x5E\x54", 3);
Memoria((LPVOID)(RECOIL4), "\xD9\x46\x48", 3);
Memoria((LPVOID)(RECOIL5), "\xD9\x5E\x48", 3);
} else {
Memoria((LPVOID)(RECOIL1), "\x90\x90\x90", 3);
Memoria((LPVOID)(RECOIL2), "\x90\x90\x90", 3);
Memoria((LPVOID)(RECOIL3), "\x90\x90\x90", 3);
Memoria((LPVOID)(RECOIL4), "\x90\x90\x90", 3);
Memoria((LPVOID)(RECOIL5), "\x90\x90\x90", 3);
}
if(GetAsyncKeyState(VK_NUMPAD1)<0){ // No Recoil
PushToConsole("SkelModelStencil 1");
} else {
PushToConsole("SkelModelStencil 0");
}
Sleep(200);
////////////////////////////////////////////////////////////////////////////////
}
}
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;
}