HelpHelp With Black Ops 3 Code

Posts 1–10 of 10 · Page 1 of 1
Help With Black Ops 3 Code
I have tried something similar to the code I have now in the past, and it worked fine, however now when I try to edit the memory I return with the "else" statement rather than the write successful message. It also is not editing the memory either. [Yes I am offline when testing these so I can prevent Vac.] Can anyone help? Here is my code:

#include <iostream>
#include <windows.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main()
{
cout << "Black Ops 3 must be open for this tool to work!" << endl;
system("Pause");
HWND hwnd = FindWindow(0, "Call of Duty® - ship - Microsoft Office");
if(hwnd == 0)
{
cout << "Black Ops 3 has not been detected as opened yet" << endl;
system("Pause");
}
else
{
DWORD proccess_ID;
GetWindowThreadProcessId(hwnd, &proccess_ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proccess_ID);
cout << "Black Ops 3 has successfully been detected!" << endl;
cout << "Type :";
int Option;
cin >> Option;
if (Option == 1)
{
cout << "Please enter your desired cash..." << endl;
cout << "Type :";
int Points;
cin >> Points;
DWORD newdatasize = sizeof(Points);
if (WriteProcessMemory(hProcess, (LPVOID)0x80A9CE4, &Points, newdatasize, NULL))
{
cout << "Your pills has been successfully written and added to the game, enjoy!" << endl;
system("Pause");
}
else
{
cout << "Nope";
}
}
}
}
First of all, don't use the namespace std. Just manually write std::cout.

Where exactly is your code breaking?
Give us more details.
What's the last message shown in the console?


BTW: if you release code pleas use code tags to get better overview over the code.
Quote Originally Posted by RoPMadM View Post
First of all, don't use the namespace std. Just manually write std::cout.

Where exactly is your code breaking?
Give us more details.
What's the last message shown in the console?


BTW: if you release code pleas use code tags to get better overview over the code.
Why not use namespace?
Quote Originally Posted by soeni77 View Post
Why not use namespace?
In some cases the compiler gets confused and generates undefined instructions.

As I said just in some cases, but to prevent this just type manually.
I managed it by using a makro key on my keyboard to type std:: instantly.
Quote Originally Posted by RoPMadM View Post


In some cases the compiler gets confused and generates undefined instructions.

As I said just in some cases, but to prevent this just type manually.
I managed it by using a makro key on my keyboard to type std:: instantly.
Oh okay
Thanks a lot m8
Quote Originally Posted by soeni77 View Post
Oh okay
Thanks a lot m8
No problem

But since I have to say it to anyone, you could press the thanks button under my posts!
Quote Originally Posted by RoPMadM View Post


In some cases the compiler gets confused and generates undefined instructions.

As I said just in some cases, but to prevent this just type manually.
I managed it by using a makro key on my keyboard to type std:: instantly.
Quote Originally Posted by WasserEsser View Post
The using directive is fine when used in a translation unit, it's bad just when used in header files. And, if I want to do this:

Code:
#include <iostream>
#include <windows.h>

int main()
{
	using namespace std;
	cout << "Black Ops 3 must be open for this tool to work!" << endl;
	system("Pause");
	HWND hwnd = FindWindow(0, "Call of Duty® - ship - Microsoft Office");
	if(hwnd == 0)
	{
		cout << "Black Ops 3 has not been detected as opened yet" << endl;
		system("Pause");
	}
	else
	{
		DWORD proccess_ID;
		GetWindowThreadProcessId(hwnd, &proccess_ID);
		HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proccess_ID);
		cout << "Black Ops 3 has successfully been detected!" << endl;
		cout << "Type :";
		int Option;
		cin >> Option;
		if (Option == 1)
		{
			cout << "Please enter your desired cash..." << endl;
			cout << "Type :";
			int Points;
			cin >> Points;
			DWORD newdatasize = sizeof(Points);
			if (WriteProcessMemory(hProcess, (LPVOID)0x80A9CE4, &Points, newdatasize, NULL))
			{
				cout << "Your pills has been successfully written and added to the game, enjoy!" << endl;
				system("Pause");
			}
			else
			{
				cout << "Nope";
			}
		}
	}
}
it's also good, because I'm using it just in that function's scope.
Umm... maybe unless you have changed it yourself...

Black Ops 3 isn't named "Call of Duty® - ship - Microsoft Office"
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us