|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
bezblue How do I cheat? Reputation: 0
Joined: 11 Mar 2018 Posts: 1
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sun Mar 11, 2018 7:14 pm Post subject: |
|
|
(uint)game.Modules[0].BaseAddress+ 0x763B0+0x284+0x5578
You don't just add the offsets together for pointers, otherwise you could just have one offset.
You have to read first read the base address (and offset if it has one) as an address, then read the next offset as an address, ..., and then read the last offset as the type you want (4 bytes in this case)
so assuming this is an x86/32 bit game addresses are 4 bytes (x64 is 8 bytes) you'd have something like, I mostly know C/C++ so this will likely be slightly wrong but close enough for you to figure out if you know the language you're writing in
Code: | void* address = game.Modules[0].BaseAddress
int offsets = [0x763B0, 0x284, 0x5578] // if base address had no offset make sure to insert a 0 at the start.
int offsetCount = 3;
int read;
// read all but the last offset and dereference as pointer/address
for (int i =0; i < offsetCount-1; i++) {
ReadProcessMemory(hProcress, address+offsets[i], address, sizeof(address), out read);
if read != sizeof(address) ERROR;
}
// get final address
address += offsets[offsetCount-1];
// could have a "readPointerPath" utility function that does the above
// read final value
int value;
ReadProcessMemory(hProcress, address, value, sizeof(value), out read);
if read != sizeof(value) ERROR; |
_________________
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|