Need Help Coding CF Hack !!

Posts 16 of 6 · Page 1 of 1
Need Help Coding CF Hack !!
Well i made a code for C++ (CrossFire) and i updated all the addys and offsets and debugged and there were no error and when i start the game the message box appears normally but nothing happens in the game should i post the code here or u guys will be able to help me without a code Arr
Well it contains "No Recoil" and in the game it is normal Recoil..
Code:



Code:
#include "stdafx.h"
#define WeaponMgr 0xA68F90
#define norecoil1   0x258C  
#define norecoil2   0x1928
#define norecoil3   0x192C
#define norecoil4   0x1930
#define norecoil5   0x2520
#define norecoil6   0x2594
#define norecoil7   0x2590
#define norecoil8   0x26A4
DWORD WINAPI Hacks(LPVOID) 
{

bool norecoil = true; 


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

if(norecoil1)
{
if (pWeaponMgr)
{
for (int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x258C) = 0.0f;
}

}
}
if(norecoil2)
{
if (pWeaponMgr)
{
for(int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x1928) = 0.0f;
}

}
}
if(norecoil3)
{
if (pWeaponMgr)
{
for(int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x192C) = 0.0f;
}

}
}
if(norecoil4)
{
if (pWeaponMgr)
{
for(int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x1930) = 0.0f;
}

}
}
if(norecoil5)
{
if (pWeaponMgr)
{
for(int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x2520) = 0.0f;
}

}
}
if(norecoil6)
{
if (pWeaponMgr)
{
for(int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x2594) = 0.0f;
}

}
}
if(norecoil7)
{
if (pWeaponMgr)
{
for(int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x2590) = 0.0f;
}

}
}
if(norecoil8)
{
if (pWeaponMgr)
{
for (int y=0; y<560; y++)
{
if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*y)) ) != NULL )
*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*y))) + 0x26A4) = 0.0f;
}

}
}
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- Moathebest V2","Beta Hack", 0);


CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0, 0);
}
return 1;
}
thx but it is still Normal Recoil in the game it didnt work....
Quote Originally Posted by moathebest View Post
thx but it is still Normal Recoil in the game it didnt work....
No recoil is patched
Quote Originally Posted by Hexicidal2 View Post


No recoil is patched
nope its not
Guys, the cpp section doesn't mind game-specific questions. But take the patched/unpatched discussions back to the designated sections. It has nothing to do with cpp and the discussions are generaly unproductive and fuel trolls and flamers.

@op

The only thing I can think of is that the recoil address is wrong,or you're not using the right bytes. Try searching for the bytes to replace and then try again if you're sure it's the right address.
Posts 16 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?