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 › Source Code Example

Source Code Example

Posts 1–15 of 44 · Page 1 of 3
CH
Chocolate[Coder]
Source Code Example
Hello guys, my name is Chocolate and no Im no copying xChocolatex lol my clan in Mw2 is called Chco soo ya.
Anywhoo I am new here and I want to display my coding ability in front of the pros at MPGH.

I will show you people who are new to coding how to make a simple hack.
Though the one i will show you is probably patched.

Code -
#include <windows.h>

to start off I use the bool IsGameReadyForHook
bool IsGameReadyForHook()
{
if(GetModuleHandleA( "bugtrap.dll" ) != NULL
&&(GetModuleHandleA( "dbghelp.dll" ) != NULL
&&(GetModuleHandleA( "kncfirewall.dll" ) != NULL))
)
return true;
return false;
} This identifies when the game is up and running and tells your dll to activate.

Then after I give my PushToConsole definition.
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3718BF20 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
} This tells the program if PushToConsole("~~~"); then make the program that you injected the Dll into to do the commands that are in you PushToConsole parenthesis.

Next I make my main void where all the meat of my program goes.
void main()
{
while(true)
{
if(GetAsyncKeyState(VK_UP)&1)
{
PushToConsole("PlayerJumpVelocity 800.000000");
PushToConsole("PlayerGravity -800");
}

if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
PushToConsole("ActivationPickupDistance 999.999999");
}
} (I made with two old PTC commands.)

After I make my dwHackThread that tells you dll what to do when injected.
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
} In this code i told it to spam the IsGameReadyForHook which indicates when the game is open and so your computer will not lagg i made a 100 milisecond wait. After i put main(); to tell them to use the main(); when it is activated and return 0; when you are finished.

Last I make the Injection function so when you inject it this is what it does.
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
MessageBoxA(0, "Hack Injection Succeded (Coded By: T7076o6o", "Succesful", 0);
}
return TRUE;
} (T7076o6o is my screen or hack testing name in GC feel free to friend him IDC)

And that is the end of my hack. Bye.
#1 · 15y ago
WH
whit
This is stupid
Show it to someone who cares..
#2 · 15y ago
NO
NOOB
CUZ PUTTING CODER NEXT TO YOUR NAME MAKES YOU A CODAH BRO!
#3 · 15y ago
CH
Chocolate[Coder]
Ouch ... That hurt on the inside.QQ Lol i care what you think because??
#4 · 15y ago
Rigby
Rigby
thats nice good job

i love how low ranks sometimes can help alot
#5 · 15y ago
WH
whit
Quote Originally Posted by Chocolate[Coder] View Post
Ouch ... That hurt on the inside.QQ Lol i care what you think because??
Cause where the people your trying to impress..
#6 · 15y ago
Rigby
Rigby
yeah whit is one of the pros here
#7 · 15y ago
NO
NOOB
wtf is a bool?

#8 · edited 15y ago · 15y ago
Houston
Houston
Old=Old
#9 · 15y ago
D-Vid the DBag
D-Vid the DBag
Quote Originally Posted by ᴺᴼᴼᴮ View Post
Code:
if(GetModuleHandleA( "bugtrap.dll" ) != NULL
&&(GetModuleHandleA( "dbghelp.dll" ) != NULL
&&(GetModuleHandleA( "kncfirewall.dll" ) != NULL))
da fuck.
That's definitely not Combat arms...
#10 · 15y ago
Bubbles Kittys
Bubbles Kittys
gtfo
#11 · 15y ago
_F
_Fk127_
What game is this for? It appears a mix of Combat Arms and something else I have never seen before :S
#12 · 15y ago
SW
Swag-Raptor
He doesnt even comment what he wrote lol. Obvious Troll is Obvious.
#13 · 15y ago
master131
[MPGH]master131
I sense a fail copy pasta.
#14 · 15y ago
-xGhost-
-xGhost-
Would be a-lot better if you wrap it as "Code" or "PHP"

Code:
#include <windows.h>

to start off I use the bool IsGameReadyForHook
bool IsGameReadyForHook()
{
if(GetModuleHandleA( "bugtrap.dll" ) != NULL
&&(GetModuleHandleA( "dbghelp.dll" ) != NULL
&&(GetModuleHandleA( "kncfirewall.dll" ) != NULL))
)
return true;
return false;
} This identifies when the game is up and running and tells your dll to activate.

Then after I give my PushToConsole definition.
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3718BF20 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}	This tells the program if PushToConsole("~~~"); then make the program that you injected the Dll into to do the commands that are in you PushToConsole parenthesis.

Next I make my main void where all the meat of my program goes.
void main()
{
while(true)
{
if(GetAsyncKeyState(VK_UP)&1)
{
PushToConsole("PlayerJumpVelocity 800.000000");
PushToConsole("PlayerGravity -800");
}

if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
PushToConsole("ActivationPickupDistance 999.999999");
}
} (I made with two old PTC commands.)

After I make my dwHackThread that tells you dll what to do when injected.
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
} In this code i told it to spam the IsGameReadyForHook which indicates when the game is open and so your computer will not lagg i made a 100 milisecond wait. After i put main(); to tell them to use the main(); when it is activated and return 0; when you are finished.

Last I make the Injection function so when you inject it this is what it does.
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
MessageBoxA(0, "Hack Injection Succeded (Coded By: T7076o6o", "Succesful", 0);
}
return TRUE;
} (T7076o6o is my screen or hack testing name in GC feel free to friend him IDC)
#15 · 15y ago
Posts 1–15 of 44 · Page 1 of 3

Post a Reply

Tags for this Thread

#combat arms source code#hacks combat arms