ThyCrusader How do I cheat?
Reputation: 0
Joined: 17 Dec 2013 Posts: 1
|
Posted: Tue Dec 17, 2013 3:32 pm Post subject: Reading value from address |
|
|
I've found this using google, and it works great.
| Code: |
void ReadProcessBYTES(DWORD lpAddress, void* buf, int len)
{
DWORD oldprot, dummy = 0;
HWND hwnd = FindWindow(NULL,_T("KalOnline"));
if (hwnd)
{
DWORD proc_id;
GetWindowThreadProcessId(hwnd, &proc_id);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id);
ReadProcessMemory(hProcess, (void *) lpAddress, buf, len, 0);
CloseHandle(hProcess);
}
}
|
| Code: |
ReadProcessBYTES(0x028F490,&Y,sizeof(DWORD));
|
But this address changes on restarting the process.
Using cheat engine I found
Address: 0x06f3840
offset: 463c
which was exactly what I was looking for, and always works in cheat engine.
Now here is my main problem, I have no clue how to include the offset into the method so that I can read the correct value.
I've been searching around on this forum, but I couldn't understand how the tutorials explained how to really do it.
I need to see a real C++ method showing how it is done, because I get nothing but confused when you tell me to: "first do this, then this, and now do that.".
If someone could show me a code example of how this can be done, It would be so much easier for me to understand.
I know it might sound weird that I would understand a code example rather than instructions of how to do it, but I've always went off better by figuring it out how it works on my own, if I just have an example to play with.
Thanks in advance.
|
|