one hit kill code crash

Posts 19 of 9 · Page 1 of 1
one hit kill code crash
i coded 1hit NO DETECTED. but if i press hotkey to ON 1hit my game crash
anyone can explain why is crash

Code:
#include <windows.h>
#include <iostream>

using namespace std;

DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");

DWORD WINAPI HOOK(LPVOID param) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(7000);
}

bool OneHit = false;
        
while(1) {

		if(GetAsyncKeyState(VK_F9) &1){OneHit = !OneHit;}
		if(OneHit){

                   DWORD dwWeapon = *(DWORD*)( dwCShell + 0xA299AC );

				   if ( dwWeapon ){
                            for( int i=0 ; i < 512 ; i++)
                            {
                                    DWORD Weapon = *(DWORD*)( dwWeapon + i * 4 );

                                    if ( Weapon ) continue;

                                   *(float*)( Weapon + 0x7A4) = 3000.0f;
                            }
							
                     }
             }
      }
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "CODE BY DOOP's", "Injected", 0);
		CreateThread(NULL, NULL,HOOK, NULL, NULL, NULL);
	}
	return TRUE;
}
this is not my UD base
*(float*)( Weapon + 0x7A4) = 3000.0f;

wrong offset
Quote Originally Posted by OverDrivejt View Post
*(float*)( Weapon + 0x7A4) = 3000.0f;

wrong offset
His right also you need to define the weapons like M16,M700 etc.. else it will not work
Quote Originally Posted by sh_z_sektor View Post
His right also you need to define the weapons like M16,M700 etc.. else it will not work
you mean we need to define weapons for oneHit
i code PCF and i dont have weapon Index for PCF
Quote Originally Posted by DOOP View Post
you mean we need to define weapons for oneHit
i code PCF and i dont have weapon Index for PCF
and does it work?
Quote Originally Posted by OverDrivejt View Post
*(float*)( Weapon + 0x7A4) = 3000.0f;

wrong offset
can u post a good one? i just playing with c++ so i wanna make some crapy hack little help would be nice :P
Quote Originally Posted by ludikrimos View Post
can u post a good one? i just playing with c++ so i wanna make some crapy hack little help would be nice :P
it is hard to start with crossfire now since Z8Games sure patched the bases :/

so i guess you start with a normal game (Easy one)
Quote Originally Posted by sh_z_sektor View Post
it is hard to start with crossfire now since Z8Games sure patched the bases :/

so i guess you start with a normal game (Easy one)
is that answer of my question? or ?
can u make it so i can download it?!?!?plzz
Posts 19 of 9 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?