Solved Address and offset is right but wrong output?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

olsarets7

Newbie
Full Member
Nov 15, 2014
13
92
0
I want to read the player health using ReadProcessMemory. This is how I get the handle'n shit:
C++:
DWORD pid;
HWND hwnd;

hwnd = FindWindow(NULL, "AssaultCube");
GetWindowThreadProcessId(hwnd,&pid);
HANDLE phandle = OpenProcess(PROCESS_VM_READ | PROCESS_VM_OPERATION | PROCESS_VM_WRITE, 0, pid);
And this is how I read the memory:

C++:
ReadProcessMemory(phandle, (void*)(playerBase + healthOffset), &value, sizeof(value), 0); //value = 420, i have it declared further up (int value = 420)
Addresses are:
playerBase = 0x00509B74;
healthOffset = 0xF8;

Yeah and when I see cout << value it shows 0, or some random number.

So my question is: Why doesnt it work, since the addresses are right?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371
Also playerBase = 0x00509B74 is incorrect.

0x00509B74 is a single player only pointer to the playerBase. You have to call ReadProcessMemory on it first, then add the offset to the result you get.

Also 0x50F4F4 works for single and multiplayer so I recommend you use that.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods