eppi (03-31-2012)
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.
Last edited by _Coder.; 03-31-2012 at 09:17 AM.
eppi (03-31-2012)
u can add @giniyat101 simple menu to your hack this makes it works as i use it and its works for me and thanks to him also thanks for @ramo he helped me alot.
@_Coder
i think this will work:
Code:#include <Windows.h> #include "exports.h" #define Ptr 0xAAC3D0 #define NoReload 0x26A4 bool reload = true; void Hacks() { while(1) { DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll"); DWORD WeaponMgr = *(DWORD*)(CShell + 0xAAC3D0); if(reload) { if (WeaponMgr) { for(int i=0; i<620; i++) { if((*(DWORD*)((*(DWORD*)(CShell+Ptr))+(4*i))) != NULL) *(float*)((*(DWORD*)((*(DWORD*)(CShell+Ptr))+(4*i))) + NoReload) = 72; } } } } } 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); } return TRUE; }
I just tested and got send error report. I just think SndDrv is detected thats all. Because i have created so many bases and none of them work and i also use SndDrv for all of them and my operating system is Windows 7 64 bit.