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 › First hack, simple hotkey.

First hack, simple hotkey.

Posts 1–8 of 8 · Page 1 of 1
YA
yaserifti1
First hack, simple hotkey.
Hey guys, this is my first hack, and I'm having troubles... I'm pretty new to C++, so please help, and don't flame.


Here is the script.
Code:
#include <windows.h>
bool IsGameReadyForHook()
bool hack;
bool hack = false;
{
if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL 
&& GetModuleHandleA( "CShell.dll"   ) != NULL )
return true;
return false;
}
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}	
void main() {
while(true) {
if bool hack = true {
if(GetAsyncKeyState(VK_NUMPAD1)&1){
PushToConsole("SkelModelStencil 1");
hack = true;
}
} else {
PushToConsole("SkelModelStencil 0");
bool hack = false;
}
}
}
}
}
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;
}
Here are my errors.
Code:
1>------ Build started: Project: cahacks1, Configuration: Debug Win32 ------
1>  Base.cpp
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(3): error C2144: syntax error : 'bool' should be preceded by ';'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(4): error C2086: 'bool hack' : redefinition
1>          c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(3) : see declaration of 'hack'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(5): error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(25): error C2062: type 'bool' unexpected
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(25): error C2143: syntax error : missing ';' before '{'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(30): error C2181: illegal else without matching if
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(36): error C2059: syntax error : '}'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(36): error C2143: syntax error : missing ';' before '}'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(36): error C2059: syntax error : '}'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(37): error C2143: syntax error : missing ';' before '}'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(37): error C2059: syntax error : '}'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(39): error C2143: syntax error : missing ';' before '{'
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(39): error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\administrator\documents\visual studio 2010\projects\cahacks1\cahacks1\base.cpp(50): error C2065: 'dwHackThread' : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can somebody please help me fix this?
#1 · edited 15y ago · 15y ago
Alessandro10
Alessandro10
Many keys wrong
#2 · 15y ago
YA
yaserifti1
Quote Originally Posted by Alessandro10 View Post
Many keys wrong
So, what do I do? I'm sorry, first time making a hack, and I am pretty new to C++.
#3 · 15y ago
TH
TheAvenger
Um you are suppose to fix them it says where you are wrong which line 1,2,3,4 as u can see there just find some tutorials on youtube how to find your wrong keywords
#4 · 15y ago
_F
_Fk127_
[Highlight=C++]#include <windows.h>
bool hack = false;
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main() {
while(true) {

if(GetAsyncKeyState(VK_NUMPAD1)&1){
hack =! hack;
}
if(hack)
{
PushToConsole("SkelModelStencil 1");
} else {
PushToConsole("SkelModelStencil 0");
}
}
}

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;
}

[/Highlight]
i fixed a bunch of stuff, come back and say whats still causing errors
#5 · 15y ago
YA
yaserifti1
Quote Originally Posted by _Fk127_ View Post
[Highlight=C++]#include <windows.h>
bool hack = false;
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main() {
while(true) {

if(GetAsyncKeyState(VK_NUMPAD1)&1){
hack =! hack;
}
if(hack)
{
PushToConsole("SkelModelStencil 1");
} else {
PushToConsole("SkelModelStencil 0");
}
}
}

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;
}

[/Highlight]
i fixed a bunch of stuff, come back and say whats still causing errors
Oh, I see what you did. Thanks!
#6 · edited 15y ago · 15y ago
_F
_Fk127_
Theres a stickied PTC commands thread
#7 · 15y ago
YA
yaserifti1
Quote Originally Posted by _Fk127_ View Post
Theres a stickied PTC commands thread
Yeah, I know, but what do integer do I use to set it off, also can you fix the other problem?


edit - Never mind, problem solved!
#8 · 15y ago
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Tags for this Thread

None