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";
}
}
}
}