Hey guys i am having trouble with my code , pelase dont flame im very weak and feeble and newby xD but yer guys i just need someone to define why my code get an error when i debug in c++!
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#define WeaponMgr 0xA65EE8
#define NoReload 0x2698
#define OneHit 0x7F8

DWORD WINAPI Hacks(LPVOID)
{
bool hak = true;
bool recoil = true;

while(1)
{
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD pWeaponMgr = *(DWORD*)(CShell+WeaponMgr);

if(hak)
{
if (pWeaponMgr)
{
for(int i=0; i<560; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + OneHit ) = 9999;
}


}
}
if(OneHit)
{
if (pWeaponMgr)
{
for(int i=0; i<560; i++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + NoReload) = 150;

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);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
return 0;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);

if ( dwReason == DLL_PROCESS_ATTACH )
{

MessageBoxA(0, "Credits- Maxpower439","Beta Hack", 0);


CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0, 0);
}
return 1;
}
Any ideas?