Hey, sorry for posting so much. But i was creating a base and it worked then it didnt? So then i started from scratch again, it injected the thread perfectly and then when i went into game there was no effect, so am i using wrong values or offsets?
Code:
#include <Windows.h>
#pragma warning(default:4716)
bool reload = true;
int Hacks(void)
{
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD WeaponMgr = *(DWORD*)(CShell + 0xAAC3D0);
if(WeaponMgr) {
for(int i=0 ; i<601 ; i++) {
DWORD Weapon = *(DWORD*)(WeaponMgr +(4*i));
if (Weapon) {
if(reload = true){
*(float*)(Weapon + 0x26A4) = (float) 100.0f;
}
}
}
Sleep(100);
}
}
bool WINAPI DllMain(HMODULE hDll, DWORD dwReason, PVOID pvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hDll);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
}
else if(dwReason == DLL_PROCESS_DETACH)
{
}
return true;
}
Thanks.
