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 › Call of Duty Hacks & Cheats › Call of Duty 8 - Modern Warfare 3 (MW3) Hacks & Cheats › Call of Duty Modern Warfare 3 Coding, Programming & Source Code › Need Help Making my first Hack!!

Need Help Making my first Hack!!

Posts 1–6 of 6 · Page 1 of 1
GA
Gam3r007
Need Help Making my first Hack!!
Hello MPGH,
I watched a tutorial on Youtube about memory hacking using c++ . I tried making a hack for MW3, but get alot of errors in cout, cerr, clog and some other stuff, Please help me @Jorndel @master131 and anyone who can help. Thanks Im waiting for your reply ppl.


 
Source Code
Code:
#include <iostream>
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>

 

// FindWindow();
// GetWindowThreadProcessId();
// OpenProcess();
// WriteProcessMemory();
// CloseHandle();

 

using namespace std;

 

int main()

{

    int Score;
	cout<<"Welcome to oTrainer v1 @MPGH.net \n";
	cout<<"Features: \n";
	cout<<"Score Hack \n";
	cout<<"Enter the Score you want:   ";

	cin>> Score;
	cin.ignore();

    HWND hWnd = FindWindow(0, "Call of Duty®: Modern Warfare® 3 Multiplayer");
	
 

    if (hWnd == 0) {

        cerr << "Cannot find window." << endl;

    } else {

        DWORD pId;

        GetWindowThreadProcessId(hWnd, &pId);

        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);

 

        if (!hProc) {

            cerr << "Cannot open process." << endl;

        } else {

            int isSuccessful = WriteProcessMemory(hProc, (LPVOID)0x000AFCC4, &Score, (DWORD)sizeof(Score), NULL);

 

            if (isSuccessful > 0) {

                clog << "Process memory written." << endl;

            } else {

                cerr << "Cannot write process memory." << endl;

            }

 

            CloseHandle(hProc);

        }

    }



    return 0;

}


 
OUTPUT
Code:
1>------ Build started: Project: Mw3, Configuration: Release Win32 ------
1>  Mw3.cpp
1>Mw3.cpp(1): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>Mw3.cpp(25): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(27): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(28): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(29): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(30): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(32): error C2065: 'cin' : undeclared identifier
1>Mw3.cpp(33): error C2065: 'cin' : undeclared identifier
1>Mw3.cpp(33): error C2228: left of '.ignore' must have class/struct/union
1>          type is ''unknown-type''
1>Mw3.cpp(35): error C2664: 'FindWindowW' : cannot convert parameter 2 from 'const char [45]' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Mw3.cpp(41): error C2065: 'cerr' : undeclared identifier
1>Mw3.cpp(41): error C2065: 'endl' : undeclared identifier
1>Mw3.cpp(55): error C2065: 'cerr' : undeclared identifier
1>Mw3.cpp(55): error C2065: 'endl' : undeclared identifier
1>Mw3.cpp(65): error C2065: 'clog' : undeclared identifier
1>Mw3.cpp(65): error C2065: 'endl' : undeclared identifier
1>Mw3.cpp(69): error C2065: 'cerr' : undeclared identifier
1>Mw3.cpp(69): error C2065: 'endl' : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
#1 · 14y ago
Jorndel
Jorndel
Quote Originally Posted by Gam3r007 View Post
Hello MPGH,
I watched a tutorial on Youtube about memory hacking using c++ . I tried making a hack for MW3, but get alot of errors in cout, cerr, clog and some other stuff, Please help me @Jorndel @master131 and anyone who can help. Thanks Im waiting for your reply ppl.


 
Source Code
Code:
#include <iostream>
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>

 

// FindWindow();
// GetWindowThreadProcessId();
// OpenProcess();
// WriteProcessMemory();
// CloseHandle();

 

using namespace std;

 

int main()

{

    int Score;
	cout<<"Welcome to oTrainer v1 @MPGH.net \n";
	cout<<"Features: \n";
	cout<<"Score Hack \n";
	cout<<"Enter the Score you want:   ";

	cin>> Score;
	cin.ignore();

    HWND hWnd = FindWindow(0, "Call of Duty®: Modern Warfare® 3 Multiplayer");
	
 

    if (hWnd == 0) {

        cerr << "Cannot find window." << endl;

    } else {

        DWORD pId;

        GetWindowThreadProcessId(hWnd, &pId);

        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);

 

        if (!hProc) {

            cerr << "Cannot open process." << endl;

        } else {

            int isSuccessful = WriteProcessMemory(hProc, (LPVOID)0x000AFCC4, &Score, (DWORD)sizeof(Score), NULL);

 

            if (isSuccessful > 0) {

                clog << "Process memory written." << endl;

            } else {

                cerr << "Cannot write process memory." << endl;

            }

 

            CloseHandle(hProc);

        }

    }



    return 0;

}


 
OUTPUT
Code:
1>------ Build started: Project: Mw3, Configuration: Release Win32 ------
1>  Mw3.cpp
1>Mw3.cpp(1): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>Mw3.cpp(25): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(27): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(28): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(29): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(30): error C2065: 'cout' : undeclared identifier
1>Mw3.cpp(32): error C2065: 'cin' : undeclared identifier
1>Mw3.cpp(33): error C2065: 'cin' : undeclared identifier
1>Mw3.cpp(33): error C2228: left of '.ignore' must have class/struct/union
1>          type is ''unknown-type''
1>Mw3.cpp(35): error C2664: 'FindWindowW' : cannot convert parameter 2 from 'const char [45]' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Mw3.cpp(41): error C2065: 'cerr' : undeclared identifier
1>Mw3.cpp(41): error C2065: 'endl' : undeclared identifier
1>Mw3.cpp(55): error C2065: 'cerr' : undeclared identifier
1>Mw3.cpp(55): error C2065: 'endl' : undeclared identifier
1>Mw3.cpp(65): error C2065: 'clog' : undeclared identifier
1>Mw3.cpp(65): error C2065: 'endl' : undeclared identifier
1>Mw3.cpp(69): error C2065: 'cerr' : undeclared identifier
1>Mw3.cpp(69): error C2065: 'endl' : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Erm, you sure you use right debugger ?
(Not Visual Studio etc)

I might look on it, when I'm done playing
#2 · 14y ago
GA
Gam3r007
Quote Originally Posted by Jorndel View Post


Erm, you sure you use right debugger ?
(Not Visual Studio etc)

I might look on it, when I'm done playing
Im using Microsoft Visual C++ 2010 Express, Can I add you in game?
#3 · 14y ago
Jorndel
Jorndel
Quote Originally Posted by Gam3r007 View Post
Im using Microsoft Visual C++ 2010 Express, Can I add you in game?
I used: Dec-C++
Here is the code that I used based on yours: (Works)
Code:
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <stdio.h>

using namespace std;

int main(int argc, char *argv[])
{
    int Score = 3;
    HWND hWnd = FindWindow(0, "Call of Duty®: Modern Warfare® 3 Multiplayer");
    if (hWnd == 0) {

        cerr << "Cannot find window." << endl;

    } else {

        DWORD pId;

        GetWindowThreadProcessId(hWnd, &pId);

        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);

 

        if (!hProc) {

            cerr << "Cannot open process." << endl;

        } else {

            cerr<<"Set your Score: ";
            cin>>Score;
            int isSuccessful = WriteProcessMemory(hProc,(LPVOID)0x1DB8BD0,&Score,sizeof(Score),NULL);

 

            if (isSuccessful > 0) {

                clog << "Process memory written." << endl;

            } else {

                cerr << "Cannot write process memory." << endl;

            }

 

            CloseHandle(hProc);

        }

    }
    system("PAUSE");
    return EXIT_SUCCESS;
}


Mostly like that |Microsoft Visual C++ 2010 Express| caused the problems here :|
#4 · 14y ago
GA
Gam3r007
Quote Originally Posted by Jorndel View Post


I used: Dec-C++
Here is the code that I used based on yours: (Works)
Code:
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <stdio.h>

using namespace std;

int main(int argc, char *argv[])
{
    int Score = 3;
    HWND hWnd = FindWindow(0, "Call of Duty®: Modern Warfare® 3 Multiplayer");
    if (hWnd == 0) {

        cerr << "Cannot find window." << endl;

    } else {

        DWORD pId;

        GetWindowThreadProcessId(hWnd, &pId);

        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);

 

        if (!hProc) {

            cerr << "Cannot open process." << endl;

        } else {

            cerr<<"Set your Score: ";
            cin>>Score;
            int isSuccessful = WriteProcessMemory(hProc,(LPVOID)0x1DB8BD0,&Score,sizeof(Score),NULL);

 

            if (isSuccessful > 0) {

                clog << "Process memory written." << endl;

            } else {

                cerr << "Cannot write process memory." << endl;

            }

 

            CloseHandle(hProc);

        }

    }
    system("PAUSE");
    return EXIT_SUCCESS;
}


Mostly like that |Microsoft Visual C++ 2010 Express| caused the problems here :|
Thnx man, It worked, your amazing!!!
#5 · 14y ago
Jorndel
Jorndel
Quote Originally Posted by Gam3r007 View Post
Thnx man, It worked, your amazing!!!
No Problem. ( I don't even code in C++ :|)

/Solved
#6 · 14y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • [Help how?]Need help making a WR hack please look.By mikelmao11 in WarRock - International Hacks
    1Last post 18y ago
  • [SOLVED] Need help for my first hackBy prompen in Call of Duty Modern Warfare 2 Help
    5Last post 15y ago
  • i need help making a CFNA hack plz anyone help!By ahmedak997 in CrossFire Help
    7Last post 14y ago
  • Need Help Making a D3D HackBy johnnydicamillo in WarRock Hack Source Code
    9Last post 15y ago
  • i need help making CA hacksBy kill_boy in Combat Arms Hacks & Cheats
    1Last post 17y ago

Tags for this Thread

None