you can't use 2 createthread function , only use 1 createthread function
#include "stdafx.h"
#include<windows.h>
#define WeaponMgr 0xA2A7E8
#define NoReload 0x2424
#define WeaponDamage 0x7F8
DWORD WINAPI Hacks(LPVOID)
{
bool onehit = false,
reload = false,
fragdmg = false;
while(1)
{
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell + 0xA2A7E8);
//hotkeys toggle + beep sounds
if(GetAsyncKeyState(VK_F9) || GetAsyncKeyState(VK_NUMPAD0) &1) { onehit = true; Beep(512, 100); }
if(GetAsyncKeyState(VK_F10) || GetAsyncKeyState(VK_NUMPAD1) &1) { reload = true; Beep(512, 100); }
if(GetAsyncKeyState(VK_F11) || GetAsyncKeyState(VK_NUMPAD2) &1) { fragdmg = true; Beep(512, 100); }
//one hit kill
if(0x7F8)
{
if (pWeaponMgr)
{
for(int i=0; i<445; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+ (4*i))) + 0x7F8) = 9999;
}
}
}
//no reload
if(0x2424)
{
if (pWeaponMgr)
{
for(int i=0; i<445; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+ (4*i))) + 0x2424) = 100;
}
}
}
Sleep(100);
}
}
bool Ready2Hook()
{
if(GetModuleHandleA("CShell.dll") != NULL
&& GetModuleHandleA("ClientFx.fxd") != NULL)
return 1;
return 0;
}
DWORD WINAPI Wait(LPVOID)
{
while(!Ready2Hook()) Sleep(200);
bool onehit = false,
reload = false,
fragdmg = false;
while(1)
{
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell + 0xA2A7E8);
//hotkeys toggle + beep sounds
if(GetAsyncKeyState(VK_F9) || GetAsyncKeyState(VK_NUMPAD0) &1) { onehit = true; Beep(512, 100); }
if(GetAsyncKeyState(VK_F10) || GetAsyncKeyState(VK_NUMPAD1) &1) { reload = true; Beep(512, 100); }
if(GetAsyncKeyState(VK_F11) || GetAsyncKeyState(VK_NUMPAD2) &1) { fragdmg = true; Beep(512, 100); }
//one hit kill
if(0x7F8)
{
if (pWeaponMgr)
{
for(int i=0; i<445; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+ (4*i))) + 0x7F8) = 9999;
}
}
}
//no reload
if(0x2424)
{
if (pWeaponMgr)
{
for(int i=0; i<445; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+ (4*i))) + 0x2424) = 100;
}
}
}
Sleep(100);
}
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Made by PrimeLove and SwiftDude and others =D","Prime PUB V1 NA", 0);
CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0, 0);
}
return 1;
}
now , your source code i fixed