Solved Half-Life 2 Base Addresses & Offsets

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

traderain

Newbie
Dank Tier Donator
Full Member
Feb 19, 2016
40
583
1
Game Name
Half-Life 2
Hi, I am trying find the base adress of the player in hl2 but when I try to search for it in Cheat Engine i can't find the actual health I got these results

If I get dmged in the game all of them change but only some of them actually change your hp in game.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,297
37,938
269
1. Get Entity Base
2. Immediately dereference
3. Add 0xC then dereference
4. Cast this to a char * and you have your entity name
 

Nazalas

Coder
Dank Tier VIP
Dank Tier Donator
May 20, 2015
99
3,963
3
Ok, so after you remove the ones that don't change in game when modified, what are you left with?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,097
78,998
2,372
Hi, I am trying find the base adress of the player in hl2 but when I try to search for it in Cheat Engine i can't find the actual health I got these results

If I get dmged in the game all of them change but only some of them actually change your hp in game.
Do you have a question or is this a blog post lol :)

Use the address that changes, and find a pointer to it.
 

traderain

Newbie
Dank Tier Donator
Full Member
Feb 19, 2016
40
583
1
Well, after some playing around the only value which actually changes health is 1A359CA4 others are only visual :p Is there any other way aside from Fleep's tutorial because I don't really understand assembly and the "Pointer scan for this adress" didn't lead me anywhere?


ps.: I am sorry for the noobish question but I have to begin somewhere I guess.:FeelsBadMan:
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,297
37,938
269
Noperino, either gotta know asm well enough to do it by hand or just use cheat engine's nifty find out what accesses/writes to this address
 

traderain

Newbie
Dank Tier Donator
Full Member
Feb 19, 2016
40
583
1
Alright, Im gonna learn asm and return to this project as soon as I am satisfied with my knowledge.

EDIT: Thanks, Im gonna check that out.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,297
37,938
269
esi = entity base
esi+9c = address of entity health

basically base+offset = what you have
offset is +9C
so base is whats in ESI
aka the player base ( or could be something lse depending on hatever youre reversing )
 

traderain

Newbie
Dank Tier Donator
Full Member
Feb 19, 2016
40
583
1
esi = entity base
esi+9c = address of entity health

basically base+offset = what you have
offset is +9C
so base is whats in ESI
aka the player base ( or could be something lse depending on hatever youre reversing )
Thanks for the reply.:D
But If I try to search for 273C388 + 9C it gives no result and if I add it as a pointer it returns a wierd value.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,297
37,938
269
Search for the value in ESI, ESI is the player base
 

Nazalas

Coder
Dank Tier VIP
Dank Tier Donator
May 20, 2015
99
3,963
3
Make sure you right click it and show as decimal and make sure that the type is the same which it looks like it is here. If that isn't it, double click the address and show us a picture of that.

Edit: Just realized there was another page to this.
 

traderain

Newbie
Dank Tier Donator
Full Member
Feb 19, 2016
40
583
1
Alright, I found everything for the player but I don't know what am I doing wrong.

C++:
	Health: 22597f78 offset 9c
		Suit:	22597f78 offset bb4
 

Nazalas

Coder
Dank Tier VIP
Dank Tier Donator
May 20, 2015
99
3,963
3
I've never used mem.readInt() but maybe this example will help if you are doing internal.

DWORD *baseEntity = (DWORD*)0x22597F78;
int health = *(int*)(*baseEntity + 0x9C);

I have not tested this but I believe it is correct.
 

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
Alright, I found everything for the player but I don't know what am I doing wrong.

C++:
    Health: 22597f78 offset 9c
        Suit:    22597f78 offset bb4
I'm assuming 0x22597F78 is the player base, so you need to do it like this:
C++:
int playerObjectPointer = 0x22597F78;
int playerObject = mem.ReadInt(playerObjectPointer);
label2.Text = mem.ReadInt(playerObject + 0x9C).ToString();
label4.Text = mem.ReadInt(playerObject + 0xBB4).ToString();
 

Nazalas

Coder
Dank Tier VIP
Dank Tier Donator
May 20, 2015
99
3,963
3
The reason that you need to do it that way is because you don't want to apply your offset to your pointer but rather the address that it points to.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,297
37,938
269
I've never used mem.readInt() but maybe this example will help if you are doing internal.

DWORD *baseEntity = (DWORD*)0x22597F78;
int health = *(int*)(*baseEntity + 0x9C);

I have not tested this but I believe it is correct.
First one should be just a dword

int health = *(int*)(baseEntity + 0x9C)
 

traderain

Newbie
Dank Tier Donator
Full Member
Feb 19, 2016
40
583
1
Thank you.

It works you people are awesome. Then only thing left is finding the enemies coordinates and hp but since they are mostly 2 hit kill I can't really scan for their hp in cheat-engine and I haven't seen any other way of finding the enemies adress.
 
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