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 › [Help]whats wrong with my code?

[Help]whats wrong with my code?

Posts 1–9 of 9 · Page 1 of 1
KI
kibbles18
[Help]whats wrong with my code?
this is my code for a nomenu hack for a fps game with DMA.
why is this code not working?
i want it to...
1. find address of server.dll + 716A34
2. put the addy above into a variable called pAddy
3. add offsett 7c8 to pAddy to get the static pointer's addy
3. put the contents of pAddy into pAmmoAddy(pAddyAmmo's contents are a addess and pAmmoValue would result in an addy)
4. change the contents of pAmmoAddy to 40 via int pointer Ammo

EDIT: NEW SOURCE CODE BELOW.

Code:
#include <stdio.h>
#include <windows.h>
DWORD *pAddy;
DWORD AmmoAddy;

DWORD GetAddress(DWORD addie, LPCSTR module)
{
	if(GetModuleHandle(module)!=NULL)
	{
		DWORD addie1=(DWORD)GetModuleHandle(module);
		DWORD addie2=addie;
		DWORD address = addie1+addie2;
		return (address);
	}
	else
	return NULL;
}

void ammo() 
{
	pAddy = (DWORD*)GetAddress(0x716A34,"server.dll");
	if(pAddy = 0)
	{
	pAddy = (DWORD*)GetAddress(0x716274,"server.dll");
	}
	 AmmoAddy = (*pAddy + 0x7c8);//AmmoAddy is contents of pAddy + offsett
	 int *Ammo = (int*)(AmmoAddy);//Ammo is now the contents of AmmoAddy
	 for(;;)
	 {
		 *Ammo = 40;
		 Sleep(20);
	 }

}

void thread()
{
	for(;;)
	{
		if(GetAsyncKeyState(VK_NUMPAD1)&1)
		{
		ammo();
		}
		Sleep(50);
	}
}

	BOOL WINAPI DllMain(HINSTANCE module, DWORD dwReason, LPVOID lpvReserved)
{
   if(dwReason == DLL_PROCESS_ATTACH)
   {
       CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)thread, NULL, NULL, NULL);
   }
return TRUE;
}
#1 · edited 15y ago · 15y ago
Void
Void
[php]
pAmmoValue = (pAddyAmmo + 0x7C8);//trying to put value of pAddyAmmo into pAmmoValue

[/php]

You didn't point to anything here.

[php]
pAmmoValue = *(pAddyAmmo + 0x7C8);//trying to put value of pAddyAmmo into pAmmoValue

[/php]
#2 · 15y ago
KI
kibbles18
thanks for all the help you have given me Void it helped me learn alot.
i shall try that when i get back in 1/2 hr.
#3 · 15y ago
SA
sam22
Quote Originally Posted by Void View Post
[php]
pAmmoValue = (pAddyAmmo + 0x7C8);//trying to put value of pAddyAmmo into pAmmoValue

[/php]

You didn't point to anything here.

[php]
pAmmoValue = *(pAddyAmmo + 0x7C8);//trying to put value of pAddyAmmo into pAmmoValue

[/php]
viod I have to say ur helping everyone in here wanna code hacks?
#4 · 15y ago
Void
Void
I'm just helping people with their problems. \:
#5 · 15y ago
KI
kibbles18
only 1 problem.. i get an error when i change it 2 what u said Void.
did u see that the pAmmoValue is a DWORD pointer?
#6 · 15y ago
Void
Void
[php]
pAmmoValue = *(DWORD**)(pAddyAmmo + 0x7C8);//trying to put value of pAddyAmmo into pAmmoValue
[/php]
#7 · 15y ago
KI
kibbles18
take a look @ my new code and try to help me out still crashing or not working
#8 · 15y ago
KI
kibbles18
oh and im pretty sure that GetModuleHandle() crashed the game.
it is a steam game, so it might have protection from that.
#9 · 15y ago
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Tags for this Thread

None