
Originally Posted by
Temperrr
Can anybody tell me what's wrong with my weapon hack source ?
Code:
Code:
DWORD wM16 = *(DWORD*)((*(DWORD*)(dw_Cshell+weaponMgr))+(25*4));
DWORD wM4A1RD = *(DWORD*)((*(DWORD*)(dw_Cshell+weaponMgr)) + (282*4));
if (wephack)
{
(wM16) = (wM4A1RD);
}
its For CFPH I know its in the wrong section but there is no coders there.
Problem : m16 wont turn in to m4a1RD
---------- Post added at 07:45 PM ---------- Previous post was at 06:09 PM ----------
/BUMP
minions don't close this.
Problem not solved.
Still same problem.
It's easier to use just a function like this:
Code:
#define M16 25
#define M4Red 282
#define weaponPointer 0x??????
void weaponHack(int original, int new)
{
DWORD cshell = (DWORD)GetModuleHandle("cshell.dll");
DWORD weaponIndex = *(DWORD*)(cshell+weaponPointer);
memcpy((DWORD*)(weaponIndex+(original*4)),(DWORD*)(weaponIndex +(new*4)),4);
}
//somewhere in your code
weaponHack(M16,M4Red);
I don't know if this works anymore because i haven't been doing anything in CF lately
btw congrats.