C++ | X,Y,Z Coordinates, Dynamic values.
Posted: Sat Mar 07, 2015 6:04 pm
Hey, i began programming in C++ in october, but as i got exams, i stopped for a while and restarted a few days ago. I am stuck on an idea since i dont know how to put it down in code, my target game is DIRT 3, but im having problems with it so lets stick with something else, for instance > Counter Strike 1.6.
I tried to make a simple money hack but the console just opens and immediately closes, heres the code.
Lately i've been trying to find X,Y,Z coordinates for the player, which then i could overwrite by WriteProcessMemory and the player could be teleported. However, by using cheat engine for years i know the HEX Values are NEVER going to be the same for something like coordinates, and lets say money, therefor making the values DYNAMIC and not STATIC. And i've got no clue how to put it into a code for it to find the dynamic values every time you restart the game. And how would i be able to make something like this teleport hack function on an online game?
DIRT 3 would be perfect since i've seen a coder named "bandiitc" do all kinds of crazy stuff in the game, and upon contacting him, he told me to use cheat engine for memory reading and editing, thats what i have been doing, but im stuck because of lack of knowledge.
Looking forward to get some help.
I tried to make a simple money hack but the console just opens and immediately closes, heres the code.
Code: Select all
#include <iostream>
#include <Windows.h>
// FindWindow();
// GetWindowThreadProcessId()
// OpenProcess();
// WriteProcessMemory();
// CloseHandle();
using namespace std;
int main()
{
int newValue = 16000;
HWND hWnd = FindWindow(0, "Counter-Strike");
if (hWnd == 0) {
cout << "Cannot find window" << endl;
}
else {
DWORD pId;
GetWindowThreadProcessId(hWnd, &pId);
HANDLE hProc = OpenProcess(PROCESS_VM_WRITE, FALSE, pId);
if (!hProc) {
cout << "Cannot open process." << endl;
}
else {
int isSuccessful = WriteProcessMemory(hProc, (LPVOID)0x14b6d20, &newValue, (DWORD)sizeof(newValue), NULL);
if (isSuccessful > 0) {
cout << "Operation succeeded";
}
else {
cout << "Operation failed";
}
CloseHandle(hProc);
}
}
return 0;
}
DIRT 3 would be perfect since i've seen a coder named "bandiitc" do all kinds of crazy stuff in the game, and upon contacting him, he told me to use cheat engine for memory reading and editing, thats what i have been doing, but im stuck because of lack of knowledge.
Looking forward to get some help.