How do you make weapon hack?
Whats the code for weapon hack
I would have though this would work, but it doesn't
I would have though this would work, but it doesn't
Code:
#include <windows.h>
#define WeaponMgr 0xA68F80
void doHack()
{
DWORD CShell = NULL;
bool Weapon = true;
// Get handle to CShell.dll
while(CShell==NULL)
{
CShell = (DWORD)GetModuleHandleA("CShell.dll");
Sleep(100);
}
DWORD* Weapon1 = (DWORD*)(*(DWORD*)((CShell + WeaponMgr)+25*4)); //25=M16
DWORD* Weapon2 = (DWORD*)(*(DWORD*)((CShell + WeaponMgr)+72*4)); //72=M4 Custom
while(1)
{
if (Weapon)
{
if ((Weapon1 != NULL) && (Weapon2 != NULL))
{
*Weapon1 = *Weapon2;
}
}
}
}
extern "C" __declspec(dllexport) BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if(fdwReason==DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)doHack, NULL, NULL, NULL);
char Msg[] = {'H', 'a', 'c', 'k', ' ', 'b', 'y', ' ', '_', 'c', 'o', 'r', 'n', '_', '\0'};
char Title[] = {'I', 'n', 'j', 'e', 'c', 't', 'e', 'd', '\0'};
MessageBox(NULL, Msg, Title, MB_OK);
}
return TRUE; // succesful
}


thanks everyone. Solved. 