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 › Keep getting errors with my hack...

UnhappyKeep getting errors with my hack...

Posts 1–12 of 12 · Page 1 of 1
blackdragon4661
blackdragon4661
Keep getting errors with my hack...
Okay, so... I'm new to hacking (please don't flame me, i'm trying and learning )

So, This is my code:
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL 
&& GetModuleHandleA( "CShell.dll"   ) != NULL )
return true;
return false;
}
void CPush(constchar* cmd)
{
_asm
{
PUSH cmd
MOV EAX, 0x00485FA0
CALL EAX
ADD ESP, 0x4
}
}
void main()
{
while(true)
{
PushToConsole("SkelModelStencil 1");
}
}
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}
It is pretty much auto-on chams (I set out for it to be that, at least...)
But when I go to build, I get:

Code:
error C2065: 'constchar' : undeclared identifier
error C2065: 'cmd' : undeclared identifier
error C2448: 'CPush' : function-style initializer appears to be a function definition
error C3861: 'PushToConsole': identifier not found
Can anyone please help me? I'm completely lost. I think I have the right unwrapp console code.... And I think I have it in there right, I'm just not sure what I did wrong...
#1 · 15y ago
dllbaseII
dllbaseII
wrong place mate
#2 · 15y ago
-Dimensions-
-Dimensions-
Code:
//You may want to use a class for the RunConsoleCommand, IsInGame, Main, and IsGameReadyForHook Functions.
/* Just in case you decide adding some stuff.
#include <d3d9.h>
#include <d3dx9.h>
#include <d3dx9core.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <stdlib.h> 
#include <string>
#include <time.h>
#include <Winuser.h>
*/
#include <windows.h>
void __cdecl RunConsoleCommand( const char* cCommand )
{
	void* address = ( void* )0x00485FA0; //Unwrapped Console Address
	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}
bool IsInGame()
{
	switch(*(int*)0x377B11B0) //Game Status Address
	{ 
	case 1:
		return true; //Your in a game
	case 5:
		return false; //Your in the lobby
	}
	return false; //Even if you aren't
}
void main( void )
{
	while ( true )
	{
		if ( IsInGame == true /*In-Game*/ && GetAsyncKeyState( VK_NUMPAD1 ) < 0 /*Self Explanitory*/ )
		{
			this->RunConsoleCommand( "SkelModelStencil 1" ); //On
		}else{
			this->RunConsoleCommand( "SkelModelStencil 0" ); //Off
		}
	}
}
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"     ) != NULL &&
		GetModuleHandleA( "ClientFX.fxd" ) != NULL &&
		GetModuleHandleA( "CShell.dll"   ) != NULL )
		return true;

	return false;
}
DWORD WINAPI dwHackThread( LPVOID )
{
	while ( !IsGameReadyForHook() )
		Sleep( 25 );

	main();

	return EXIT_SUCCESS;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls( hDll );
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread( NULL, NULL, dwHackThread, NULL, NULL, NULL );
	}
	return TRUE;
}
Heres credits:
Me, DeadLine, Flameswort10, Gellin.

Much neater and if you get a error fix it yourself.
Those were the easiest errors to fix ever, but I'm guessing your a noobie.
I'm not going to flame or troll b/c that not me.
Additionally like DLLBaseII said, wrong section.
Make sure its MultiByte in the Project Properties.
Consider my assistance expired. Bye.
#3 · edited 15y ago · 15y ago
blackdragon4661
blackdragon4661
Thank you so much, and yes, I am a noobie :/ But i'm trying to learn. I searched google for those errors but nothing popped up. Thank you for not trolling, and actually helping
#4 · edited 15y ago · 15y ago
Skaterforeva1
Skaterforeva1
Quote Originally Posted by -Dimensions- View Post
Code:
//You may want to use a class for the RunConsoleCommand, IsInGame, Main, and IsGameReadyForHook Functions.
/* Just in case you decide adding some stuff.
#include <d3d9.h>
#include <d3dx9.h>
#include <d3dx9core.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <stdlib.h> 
#include <string>
#include <time.h>
#include <Winuser.h>
*/
#include <windows.h>
void __cdecl RunConsoleCommand( const char* cCommand )
{
	void* address = ( void* )0x00485FA0; //Unwrapped Console Address
	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}
bool IsInGame()
{
	switch(*(int*)0x377B11B0) //Game Status Address
	{ 
	case 1:
		return true; //Your in a game
	case 5:
		return false; //Your in the lobby
	}
	return false; //Even if you aren't
}
void main( void )
{
	while ( true )
	{
		if ( IsInGame == true /*In-Game*/ && GetAsyncKeyState( VK_NUMPAD1 ) < 0 /*Self Explanitory*/ )
		{
			this->RunConsoleCommand( "SkelModelStencil 1" ); //On
		}else{
			this->RunConsoleCommand( "SkelModelStencil 0" ); //Off
		}
	}
}
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"     ) != NULL &&
		GetModuleHandleA( "ClientFX.fxd" ) != NULL &&
		GetModuleHandleA( "CShell.dll"   ) != NULL )
		return true;

	return false;
}
DWORD WINAPI dwHackThread( LPVOID )
{
	while ( !IsGameReadyForHook() )
		Sleep( 25 );

	main();

	return EXIT_SUCCESS;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls( hDll );
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread( NULL, NULL, dwHackThread, NULL, NULL, NULL );
	}
	return TRUE;
}
Heres credits:
Me, DeadLine, Flameswort10, Gellin.

Much neater and if you get a error fix it yourself.
Those were the easiest errors to fix ever, but I'm guessing your a noobie.
I'm not going to flame or troll b/c that not me.
Additionally like DLLBaseII said, wrong section.
Make sure its MultiByte in the Project Properties.
Consider my assistance expired. Bye.
&#x202a;INTERIOR CROCODILE ALLIGATOR&#x202c;&rlm; - YouTube
thanks i been looking for an ingame function thats y my hack hasnt been working that well
#5 · 15y ago
-Dimensions-
-Dimensions-
Once again, press Thanks if I helped.
#6 · 15y ago
freedompeace
freedompeace
You errors, in friendly descriptions, are:
- 'constchar' : undeclared identifier
- 'cmd' : undeclared identifier
- 'CPush' : function-style initializer appears to be a function definition
- 'PushToConsole': identifier not found

(pretty obvious lol)
#7 · 15y ago
KI
kibbles18
You copy - pasted some random functions into your compiler and expected it to work. Whats even sadder is that you googled the errors l0l.
#8 · 15y ago
GO
Gordon`
Code:
void CPush(constchar* cmd)
=>
Code:
void PushToConsole(const char* cmd)
as freedompeace said, the error messages got all infos u need to fix the problem.

constchar doesnt exist in c++, its const char. the reason why the error log also says that "cmd" is an undeclared identifier is because constchar doesnt exist.
#9 · 15y ago
yodaliketaco
yodaliketaco
Quote Originally Posted by -Dimensions- View Post
Code:
//You may want to use a class for the RunConsoleCommand, IsInGame, Main, and IsGameReadyForHook Functions.
/* Just in case you decide adding some stuff.
#include <d3d9.h>
#include <d3dx9.h>
#include <d3dx9core.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <stdlib.h> 
#include <string>
#include <time.h>
#include <Winuser.h>
*/
#include <windows.h>
void __cdecl RunConsoleCommand( const char* cCommand )
{
	void* address = ( void* )0x00485FA0; //Unwrapped Console Address
	__asm
	{
		Push cCommand
		call address
		add esp, 0x4
	}
}
bool IsInGame()
{
	switch(*(int*)0x377B11B0) //Game Status Address
	{ 
	case 1:
		return true; //Your in a game
	case 5:
		return false; //Your in the lobby
	}
	return false; //Even if you aren't
}
void main( void )
{
	while ( true )
	{
		if ( IsInGame == true /*In-Game*/ && GetAsyncKeyState( VK_NUMPAD1 ) < 0 /*Self Explanitory*/ )
		{
			this->RunConsoleCommand( "SkelModelStencil 1" ); //On
		}else{
			this->RunConsoleCommand( "SkelModelStencil 0" ); //Off
		}
	}
}
bool IsGameReadyForHook()
{
	if( GetModuleHandleA( "d3d9.dll"     ) != NULL &&
		GetModuleHandleA( "ClientFX.fxd" ) != NULL &&
		GetModuleHandleA( "CShell.dll"   ) != NULL )
		return true;

	return false;
}
DWORD WINAPI dwHackThread( LPVOID )
{
	while ( !IsGameReadyForHook() )
		Sleep( 25 );

	main();

	return EXIT_SUCCESS;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls( hDll );
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread( NULL, NULL, dwHackThread, NULL, NULL, NULL );
	}
	return TRUE;
}
Heres credits:
Me, DeadLine, Flameswort10, Gellin.

Much neater and if you get a error fix it yourself.
Those were the easiest errors to fix ever, but I'm guessing your a noobie.
I'm not going to flame or troll b/c that not me.
Additionally like DLLBaseII said, wrong section.
Make sure its MultiByte in the Project Properties.
Consider my assistance expired. Bye.
&#x202a;INTERIOR CROCODILE ALLIGATOR&#x202c;&rlm; - YouTube
One problem I see in your code:

Code:
if ( IsInGame == true &&...)
Change that to

Code:
if ( IsInGame() &&...)
Otherwise you are checking if the address of the function IsInGame is 1, which is obviously never the case.
#10 · 15y ago
-Dimensions-
-Dimensions-
Quote Originally Posted by yodaliketaco View Post
One problem I see in your code:

Code:
if ( IsInGame == true &&...)
Change that to

Code:
if ( IsInGame() &&...)
Otherwise you are checking if the address of the function IsInGame is 1, which is obviously never the case.
My bad thank you.
#11 · 15y ago
DE
DecoderBack
Quote Originally Posted by yodaliketaco View Post
One problem I see in your code:

Code:
if ( IsInGame == true &&...)
Change that to

Code:
if ( IsInGame() &&...)
Otherwise you are checking if the address of the function IsInGame is 1, which is obviously never the case.
Nice one bro
#12 · edited 15y ago · 15y ago
Posts 1–12 of 12 · Page 1 of 1

Post a Reply

Similar Threads

  • I keep getting error when opening hack[HELP!!!!!!]By Cagamer in Combat Arms Hacks & Cheats
    18Last post 17y ago
  • Getting error with NA hack in-gameBy bullshit1234 in CrossFire Help
    9Last post 14y ago
  • Still get Error from charm hackBy azngamerboi9 in Combat Arms Hacks & Cheats
    2Last post 18y ago
  • Keep Getting Error CodeBy Promisetime in Combat Arms Hacks & Cheats
    15Last post 18y ago
  • Error with new hacks rofl. With pics.By omgonoes in Combat Arms Hacks & Cheats
    12Last post 17y ago

Tags for this Thread

None