Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Combat Arms Hacks & Cheats › Combat Arms Hack Coding / Programming / Source Code › Combat Arms Coding Help & Discussion › c++ fatal error HELP!!

c++ fatal error HELP!!

Posts 1–4 of 4 · Page 1 of 1
DE
Dead3nd
c++ fatal error HELP!!
When I compile Nightmares hot key hack I get this error

1>c:\users\Blocked\documents\visual studio 2010\projects\blocked\blocked\dllmain.cpp(10): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory


Code:
***********Nightmare HotKey 2.0************************************************/
/***********Créditos************************************************************/
/******Nightmare, luizimloko, TokolocoSK, Gordon', Entourage, Gellin************/
/*******************************************************************************/

#include <windows.h>
#include <stdio.h>
#include <d3dx9.h>
#pragma comment( lib, "nod3dx9.lib" )

//Addresses CANA
#define DeviceGame      0x009118A0
#define GlassWalls      0x0057301A
#define DIPEngine       0x006A3E1A
#define DrawPrimitive   0x00805974
#define LTClientEXE     0x00486030
#define LTClientDLL     0x37814EB8
#define GameStatus      0x3782A118
#define EspName1        0x37306A79
#define EspName2        0x37306AFF
#define NoRecoil        0x373B619C
#define NoReload        0x37433034
#define SuperBullets    0x3742DB7D
#define WeaponRange1    0x374332B9
#define WeaponRange2    0x37433639
#define PlayerRandom    0x37860678
#define RapidFire       0x37433D35
#define WeaponManager   0x3785C8FC
#define PlayerByIndex   0x371561F0



typedef HRESULT ( __stdcall* oPresent ) ( LPDIRECT3DDEVICE9 pDevice, const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion);
oPresent pPresent;

BOOL IsGameReadyForHook(void)
{
	if(GetModuleHandleA("d3d9.dll") != NULL 
	&& GetModuleHandleA("ClientFX.fxd") != NULL 
	&& GetModuleHandleA("CShell.dll") != NULL)
		return true;

	return false;
}

void Memoria( void* pvAddress, void* pvBuffer, size_t len )
{
	if( *(BYTE*)pvAddress == *(BYTE*)pvBuffer )
		return;

	memcpy( ( void* )pvAddress, ( void* )pvBuffer, len );
}

bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask) 
{ 
    for(;*szMask;++szMask,++pData,++bMask) 
    if(*szMask=='x' && *pData!=*bMask )  
    return false; 
    return (*szMask) == NULL; 
} 

DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask) 
{ 
    for(DWORD i=0; i < dwLen; i++) 
		if(bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask) ) 
            return (DWORD)(dwAddress+i); 
     
    return 0; 
}

DWORD Ngm_GetPointer(int Begin)
{
	DWORD *Device = ***(DWORD ****)DeviceGame;

	if(Device == NULL)
		return 0;

	return Device[Begin];
}

void __stdcall Ngm_ConsolePush( const char* Ngm_Command)
{
	DWORD* Ngm_Addr = ( DWORD* ) LTClientEXE;
	if(*(BYTE*)GameStatus == 1) 
	{
	__asm
	{
		Pushad;
		Push Ngm_Command
		call Ngm_Addr
		add esp, 0x4
		Popad;
		}
	}
}

//Variables
int cchams, cfog, cpick, cpickx1, cnames, crecoil, cspread,cspreadx1, cfps, cweaponrange, csuperbullets, crapidfire;
bool bfog, bchams, bpick, bspread, bfps, bnames, brecoil, bweaponrange, bsuperbullets, brapidfire;

void Ngm_Main(void) 
{
	if (GetAsyncKeyState(VK_NUMPAD1)&1) cfog = !cfog;
	if(cfog)
		{
			if(!bfog)
			{
				Ngm_ConsolePush("FogEnable    0.0");
				bfog = true;
			}
		}
		else
		{
			if(bfog)
			{
				Ngm_ConsolePush("FogEnable    1.0");
				bfog = false;
			}
		}

	
	if (GetAsyncKeyState(VK_INSERT)&1) cchams = !cchams;
	if(cchams)
		{
			if(!bchams)
			{
				Ngm_ConsolePush("SkelModelStencil     1.0");
				bchams = true;
			}
		}
		else
		{
			if(bchams)
			{
				Ngm_ConsolePush("SkelModelStencil     0.0");
				bchams = false;
			}
		}

	if (GetAsyncKeyState(VK_NUMPAD3)&1) cpick = !cpick;
	if(cpick)
		{
			if(!bpick)
			{
				Ngm_ConsolePush("ActivationDistance   99999.0");
				bpick = true;
			}
		}
		else
		{
			if(bpick)
			{
				Ngm_ConsolePush("ActivationDistance   100.0");
				bpick = false;
			}
		}

	if (GetAsyncKeyState(VK_NUMPAD4)&1) cspread = !cspread;
	if(cspread)
		{
			if(!bspread)
			{
				Ngm_ConsolePush("PerturbRotationEffect   0.000000" );
				Ngm_ConsolePush("PerturbIncreaseSpeed   0.000000" );
				Ngm_ConsolePush("PerturbWalkPercent   0.000000" );
				Ngm_ConsolePush("PerturbFiringIncreaseSpeed   0.000000" );
				Ngm_ConsolePush("PerturbRecoil   0.000000" );
				Ngm_ConsolePush("FireMovePerturb   0.000000" );
				Ngm_ConsolePush("ZoomedFireMoveDuckPerturb   0.000000" );
				Ngm_ConsolePush("ZoomedFireMovePerturb   0.000000" );
				Ngm_ConsolePush("ZoomedFireDuckPerturb   0.000000" );
				bspread = true;
			}
		}
		else
		{
			if(bspread)
			{
				Ngm_ConsolePush("PerturbRotationEffect   3.000000" );
				Ngm_ConsolePush("PerturbIncreaseSpeed   3.000000" );
				Ngm_ConsolePush("PerturbWalkPercent   9.000000" );
				Ngm_ConsolePush("PerturbFiringIncreaseSpeed   0.500000" );
				Ngm_ConsolePush("PerturbRecoil   9.000000" );
				Ngm_ConsolePush("FireMovePerturb   9.000000" );
				Ngm_ConsolePush("ZoomedFireMoveDuckPerturb   9.000000" );
				Ngm_ConsolePush("ZoomedFireMovePerturb   9.000000" );
				Ngm_ConsolePush("ZoomedFireDuckPerturb   9.000000" );
				bspread = false;
			}
		}

	if (GetAsyncKeyState(VK_NUMPAD5)&1) cfps = !cfps;
	if(cfps)
		{
			if(!bfps)
			{
				Ngm_ConsolePush("ShowFps   1.0");
				bfps = true;
			}
		}
		else
		{
			if(bfps)
			{
				Ngm_ConsolePush("ShowFps   0.0");
				bfps = false;
			}
		}

	if (GetAsyncKeyState(VK_HOME)&1) cnames = !cnames;
	if ((*(BYTE *)GameStatus == 1) && cnames) {
			if(!bnames)
			{
				memcpy((void *)EspName1, (void *)(PBYTE)"\x90\x90", 2);
				memcpy((void *)EspName2, (void *)(PBYTE)"\x90\x90", 2);
				bnames = true;
			}
		}
		else
		{
			if(bnames)
			{
				memcpy((void *)EspName1, (void *)(PBYTE)"\x75\x05", 2);
				memcpy((void *)EspName2, (void *)(PBYTE)"\x75\x05", 2);
				bnames = false;
			}
		}

	if (GetAsyncKeyState(VK_NUMPAD7)&1) crecoil = !crecoil;
	if ((*(BYTE *)GameStatus == 1) && crecoil) {
			if(!brecoil)
			{
				memcpy((void *)NoRecoil, (void *)(PBYTE)"\x90\x90\x90\x90", 4);
				brecoil = true;
			}
		}
		else
		{
			if(brecoil)
			{
				memcpy((void *)NoRecoil, (void *)(PBYTE)"\xD9\x44\x24\x14", 4);
				brecoil = false;
			}
		}

	if (GetAsyncKeyState(VK_NUMPAD8)&1) cweaponrange = !cweaponrange;
	if ((*(BYTE *)GameStatus == 1) && cweaponrange) {
			if(!bweaponrange)
			{
				memcpy((void *)WeaponRange1, (void *)(PBYTE *)"\xB8\x00\x00\x00\x10\x90", 6);
				memcpy((void *)WeaponRange2, (void *)(PBYTE *)"\xB8\x00\x00\x00\x10\x90", 6);
				bweaponrange = true;
			}
		}
		else
		{
			if(bweaponrange)
			{
				memcpy((void *)WeaponRange1, (void *)(PBYTE *)"\x8B\x80\xD4\x02\x00\x00", 6);
				memcpy((void *)WeaponRange2, (void *)(PBYTE *)"\x8B\x80\xD4\x02\x00\x00", 6);
				bweaponrange = false;
			}
		}

	if (GetAsyncKeyState(VK_NUMPAD9)&1) csuperbullets = !csuperbullets;
	if ((*(BYTE *)GameStatus == 1) && csuperbullets) {
			if(!bsuperbullets)
			{
				memcpy((void *)SuperBullets, (void *)(PBYTE)"\x90\x90\x90", 3);
				bsuperbullets = true;
			}
		}
		else
		{
			if(bsuperbullets)
			{
				memcpy((void *)SuperBullets, (void *)(PBYTE)"\x0F\x94\xC0", 3);
				bsuperbullets = false;
			}
		}

	if (GetAsyncKeyState(VK_NUMPAD0)&1) crapidfire = !crapidfire;
	if ((*(BYTE *)GameStatus == 1) && crapidfire) {
			if(!brapidfire)
			{
				memcpy((void *)RapidFire, (void *)(PBYTE) "\x90\x90", 2);
				brapidfire = true;
			}
		}
		else
		{
			if(brapidfire)
			{
				memcpy((void *)RapidFire, (void *)(PBYTE) "\x74\x3E", 2);
				brapidfire = false;
				}
		}
}

HRESULT __stdcall gellPresent(LPDIRECT3DDEVICE9 pDevice, const RECT *pSourceRect,
const RECT *pDestRect, HWND hDestWindowOverride, const RGNDATA *pDirtyRegion)
{
	_asm pushad;
	Ngm_Main();
	_asm popad;
	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}

void *Ngm_DetourCreate( BYTE *src, const BYTE *dst, const int len )
{
	unsigned int Ngm_Pointers[] = { 0xE9 };
	DWORD dwBack;
	BYTE *jmp = (BYTE*)malloc( len + 5 );
	VirtualProtect( src, len, PAGE_EXECUTE_READWRITE, &dwBack );
	memcpy( jmp, src, len );	
	jmp += len;
	jmp[0] = Ngm_Pointers[0];
	*(DWORD*)( jmp+1 ) = (DWORD)( src+len - jmp ) - 5;
	src[0] = Ngm_Pointers[0];
	*(DWORD*)( src+1 ) = (DWORD)( dst - src ) - 5;
	VirtualProtect( src, len, dwBack, &dwBack );
	return( jmp-len );
}

void Ngm_Hook(void)
{
     DWORD dwPresent  = Ngm_GetPointer (17);
     pPresent  = (oPresent)Ngm_DetourCreate(( PBYTE)dwPresent, ( PBYTE )gellPresent, 5);
}

DWORD __stdcall dwD3D9Thread(LPVOID)
{
	while( !IsGameReadyForHook() )
		Sleep(100);
	Ngm_Hook();
	return 0;
}

bool __stdcall DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if(dwReason == DLL_PROCESS_ATTACH) {
		//MessageBox(0, "Your Text", "Title", MB_OK);
		CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)dwD3D9Thread, NULL, NULL, NULL);
	}
	return true;
}



Can someone help me???
#1 · 14y ago
NotRealPro
NotRealPro
Download the D3d9 sdk and add it to your include directory's
#2 · 14y ago
DE
Dead3nd
Quote Originally Posted by NotRealPro View Post
Download the D3d9 sdk and add it to your include directory's
I am trying now.
#3 · 14y ago
XI
Xipher
Any luck with the result?
#4 · 14y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • Help Game Frezes and Give Fatal ErrorBy pr0h4x0r in Call of Duty Black Ops Help
    1Last post 15y ago
  • MSVCR100 error help profireBy x8xbcdhx8x in Combat Arms Help
    5Last post 15y ago
  • CANA Error Help!!!By ParkII in Combat Arms Brazil Help
    5Last post 15y ago
  • error LNK2001 | fatal error LNK1120By johwsouza in Combat Arms BR Coding Help
    6Last post 14y ago
  • Fatal ErrorBy darkloquis in Combat Arms BR Coding Help
    2Last post 14y ago

Tags for this Thread

None