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 › Programming › C++/C Programming › Game Mechanics and Hooking it in

QuestionGame Mechanics and Hooking it in

Posts 1–3 of 3 · Page 1 of 1
Ruined1
Ruined1
Game Mechanics and Hooking it in
If anyone could jot something up or point me in the right direction here... I want to learn how to take source codes (I hope to write my own some day =/) and compile them (even one) into a dll with a hook to make it work in the game... If ANYONE could just point me in the right direction there...

Also, the original creators of the hacks.... How the hell do they find these values that they use?
Code:
Code:
//=============================================================================
// Function: No Recoil
void NoRecoil(AcItem* pItem = NULL)
{
	if (!pItem)
		return;
		
	AcRaycastWeapon* pRaycastWeapon = NULL;

	if (pItem->IsA(AcRaycastWeapon::StaticClass()))
		pRaycastWeapon = reinterpret_cast<AcRaycastWeapon*>(pItem);
	else
		return;

	pRaycastWeapon->m_WeaponRecoilSettings.m_fEndYawMin = 0.0f;
	pRaycastWeapon->m_WeaponRecoilSettings.m_fEndYawMax = 0.0f;
	pRaycastWeapon->m_RangedWeaponTypeSettings.m_fMaxRange = 0.0f;
	pRaycastWeapon->m_RangedWeaponTypeSettings.m_fRampDistance = 0.0f;

	/* Return old values... */
}

...
NoRecoil(pPlayerController->m_HoldableItemManager->m_CurrentItem);
How did this coder find the names of these variables? like:
Code:
if (pItem->IsA(AcRaycastWeapon::StaticClass()))
		pRaycastWeapon = reinterpret_cast<AcRaycastWeapon*>(pItem);
	else
What process do you go through to find these values out?

Ammo, for example, is easy... You just freeze a value in memory that you find through the process of elimination via a UCE....
How did this coder figure out that the variable for the weapon being held was pRaycastWeapon?

Like I said if anyone can point me in the right direction... and if I can wrap my mind around it... I will practice this and post hacks...
MPGH Only hacks... (that's just how I am, dedicated to this forum =/) not that it means too much but still...

Thanks to anyone willing to feed my ignorance/curiosity in advance...
#1 · 14y ago
.::SCHiM::.
.::SCHiM::.
The no recoil addresses are often conditional jumps (if you really want to make your own hacks, and not have a credits list covering half of your post you'll need to know assembler too), for example consider the following:

Code:
 // this is supposed to be the sourcode of the game, managing recoil


function recoil(){   // this function manages recoil

player.crosshair.x += 0.1;
return;
}

function shoot(){
 if(player->isshooting() == true ){
    recoil();    
 }
}
Now the condition if( player->isshooting() == true ) can deleted/changed by a hack so that the function recoil() is never executed. Like this:

Code:
if( false == true ){
      recoil();    
}
Obviously false is not equal to true, so the recoil() is never called, now you don't have any recoil.

However most programs are not distributed in the relatively easy C++/C code, but rather in their compiled assembler representatives (binary). You'll have to sift through the same code but then in the assembly language. It could now look like this:

Code:
push struct_player
lea ecx, struct_player
mov eax, dword ptr[ ecx + offset isshooting ]
call eax

cmp eax, 0                                   ; You'll have to change this instruction / this is the same if-statement from before
je Not_shooting         

push struct_player
call recoil

Not_shooting:
ret
As you can see, these look very different from the C++ pseudo source code. I hope I've made it a bit clearer.
#2 · edited 14y ago · 14y ago
25
258456
Sometimes it's just a bunch of offsets. Like in crossfire it is like 7 arrays with 9 members that you set to 0. In assault cube you just nop 3 instructions. Every game does it different. Disassembly is more like a puzzle. You see what's happening but you have to kind of solve your way through in order to understand what the code is actually doing and then find a method that will solve it.
#3 · 14y ago
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

  • Is this game Hackable and hack suggestionsBy cherokee in Hack Requests
    23Last post 20y ago
  • How To Find .SWF For Any Game. Quick and EasyBy JustTheWind in Programming Tutorials
    1Last post 17y ago
  • FUUCCCKKK!!!! keep getting booted from the game(crossfire) and my day was so shitttBy Mr Moggy in Flaming & Rage
    12Last post 17y ago
  • Request on java Game Programming and 3D Game ProgrammingBy aditya258 in Java
    2Last post 16y ago
  • TQ games Eudemons (and Conquer)By thenrkst in General Game Hacking
    0Last post 19y ago

Tags for this Thread

None