Corruptor Advanced Cheater
Reputation: 3
Joined: 10 Aug 2011 Posts: 82
|
Posted: Sun Feb 05, 2012 2:29 pm Post subject: |
|
|
Ok, just to make sure i understand this correctly:
situation: using cheat engine, you found an adress containing e.g the health. you know what type it is (float, int, double etc) and you know the adress (or the pointer(s) pointing at it).
Now you want to write your own program in c++ which holds this health in a variable.
I wonder if i understood it correctly since this seems to be a question about c++. anyways, just in case that this is what you want:
you can not simply have the health as a variable in your program. What you can do is reading the health at any time, and write the result into a variable. This variable will not change itself when you health is changed in the game, though.
Also, you will need the winapi. If thats really what you want to do, reply to this and i will give further explainations.
Basiacly, you will have to #include <windows.h>, get debug rights using "OpenProcessToken" and "AdjustTokenPrivilegs" and hook into it using "OpenProcess" function. Once you did that, you can use the WriteProcessMemory and ReadProcessMemory functions at any time to read or write your health.
|
|