Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
system("color 0A");
cout << "Counter Strike Source is opened before pressing ENTER..." << endl;
system("Pause");
LPCWSTR Fuck = L"Counter-Strike Source";
HWND hwnd = FindWindow(0, Fuck);
if (hwnd == 0)
{
cout << "The game has not been found... please open it before opening the tool next time..." << endl;
system("Pause");
}
else
{
DWORD process_ID;
GetWindowThreadProcessId(hwnd, &process_ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
cout << "Counter Strike Source has been found... Enjoy the tool!" << endl;
system("Pause");
cout << "Type 1 for Health" << endl;
cout << "Type : ";
int Option;
cin >> Option;
if (Option > 1)
{
cout << "There is no option higher than 1..." << endl;
system("Pause");
}
if (Option == 1)
{
cout << "What do you want to set your Health as?" << endl;
cout << "Type : ";
int Health;
cin >> Health;
DWORD newdatasize = sizeof(Health);
// 0x01B2C89C
if (WriteProcessMemory(hProcess, (LPVOID)0x01B2C89C, &Health, newdatasize, NULL))
{
cout << "The Health has been written sucessfully!!" << endl;
system("Pause");
}
else
{
cout << "There was an error writing the Health..." << endl;
system("Pause");
}
}
}
main();
return 0;
}
[font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]https://s27.postimg.org/d005tf2wj/Untitled.png[/font]
![Untitled.png](https://s27.postimg.org/d005tf2wj/Untitled.png)
Please don't ignore this topic xd i really need ur help, It says "There was an error writing the Health..." Idk why i did all good, it's copied but usually i make like this code.