bool HookReady()
{
if( GetModuleHandleA( "d3d9.dll" ) //Not required if just memory hacking
!= NULL && GetModuleHandleA("CShell.dll" ) != NULL &&
GetModuleHandleA( "ClientFX.fxd" ) != NULL)
return true;
return false;
}
bool inGame()
{
if((*(INT*)GameStatus_ADDR== 1))
return true;
else
return false;
}
#include <windows.h>
#define SuperBullets 0x3740DDB6 /*Defining the address of SuperBullets*/
void Main()
{
if(GameStatus == 1)/*Checking if In game*/
{
if(GetAsyncKeyState (VK_NUMPAD1))/*If Key is pressed*/
{
memcpy((LPVOID)SuperBullets, "\x33\xC0\x90", 3);//ON
} else {
memcpy((LPVOID)SuperBullets, "\x0F\x94\xC0", 3);//OFF
}
}
}
bool IsGameReady(void) //Gets the handle of all of these
{
if( GetModuleHandleW( L"d3d9.dll" ) != NULL
&& GetModuleHandleW( L"ClientFX.fxd" ) != NULL
&& GetModuleHandleW( L"CShell.dll" ) != NULL )
return true;
return false;
}
DWORD WINAPI dwMainThread(LPVOID)
{
while ( !IsGameReady() )
Sleep(100);
Main();
return 0;
}
BOOL WINAPI DllMain(
HINSTANCE hinstDLL, // handle to DLL module
DWORD fdwReason, // reason for calling function
LPVOID lpReserved ) // reserved
{
// Perform actions based on the reason for calling.
switch( fdwReason )
{
case DLL_PROCESS_ATTACH:
// Initialize once for each new process.
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)dwMainThread, NULL, NULL, NULL);
MessageBoxA(NULL, "Message", "Caption", MB_OK);
break;
case DLL_THREAD_ATTACH:
// Do thread-specific initialization.
break;
case DLL_THREAD_DETACH:
// Do thread-specific cleanup.
break;
case DLL_PROCESS_DETACH:
// Perform any necessary cleanup.
break;
}
return TRUE; // Successful DLL_PROCESS_ATTACH.
}

//At top of program BOOL sBullets = false; //top of main loop if(GetAsyncKeyState (VK_NUMPAD1)) sBullets = !sBullets //Switch state to opposite //In loop farther down if(sBullets ) memcpy((LPVOID)SuperBullets, "\x33\xC0\x90", 3);//ON else memcpy((LPVOID)SuperBullets, "\x0F\x94\xC0", 3);//OFF

