Solved Get Entity Distance

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

xHunter

Newbie
Full Member
Jun 12, 2017
22
87
1
Hello, I started a little time with gamehacking, I'm having a hard time getting EntityBase for CS 1.6 Steam using Cheat Engine, the EntityLoopDistance always changes, does not have a fixed EntityLoopDistance, can anyone please help me?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,093
78,998
2,372
xHunter each pointer will be seperated by 4 bytes because that's the size of a pointer on 32bit and it looks like you're external so you would have to ReadProcessMemory

something like

C++:
DWORD playerPtrArray = whatever;
DWORD Player[32];

for (int i = 0, i < numPlayers; int++)
{
ReadProcessMemory(hProc, (LPVOID)(platerPtrArray + i * 4), &Player[i], 0);
}
now each element of Player[32] is a the address of a player, you will have to extend and modify for your game and error checking/sanity checks
 

xHunter

Newbie
Full Member
Jun 12, 2017
22
87
1
how r u reaching there in the first place?
I first looked for the player's life and then the pointer + offset, and I repeated the process for the other players and found the EntityDistance, but when I restart the game, EntityDistance changes, I'm sure the pointer and offset are correct, already I have been trying for 2 months without any success, I tried in several ways.
 

xHunter

Newbie
Full Member
Jun 12, 2017
22
87
1
11100001111011100111 2 Level
Rake Yes, it is quite different, for bot it is a pointer that is located in the module csbot.dll, for online players it is another pointer that is located in hw.dll and it only updates the positions if the player is visible in his camera
 

11100001111011100111

Newbie
Full Member
Mar 5, 2017
28
72
1
if you're doing automatic pointer scanning, make sure you have the right pointer path that is static AND connect with your struct and other entities, you're probably getting a stack that isn't static, worse case scenario valve change up some coding algorithms to fk with ya but i doubt it. the way i get entity struct is through going back far enough, like 5 levels deep from a address that gets proc'ed by an instruction that proc's an array of entities, i think for old games like CS isn't necessary (but who knows), so i don't know much bout CS.
 

xHunter

Newbie
Full Member
Jun 12, 2017
22
87
1
if you're doing automatic pointer scanning, make sure you have the right pointer path that is static AND connect with your struct and other entities, you're probably getting a stack that isn't static, worse case scenario valve change up some coding algorithms to fk with ya but i doubt it. the way i get entity struct is through going back far enough, like 5 levels deep from a address that gets proc'ed by an instruction that proc's an array of entities, i think for old games like CS isn't necessary (but who knows), so i don't know much bout CS.
I was trying for 2 months, I used several types of methods and other pointers, some pointers are left with the address oscillating to other addresses, there is nothing to do with the Entity address I tried to search using the method taught by Fleep and also to no avail. With pointers above 2 levels or even 5 as you said it causes the address to change every 1 second to another address.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,093
78,998
2,372
entity lists are either arrays of player objects or an array of pointers to player objects. If it's an array of objects, loop distance works. If it's an array of pointers to dynamically allocated objects, then you will just use those pointers rather than a loopdistance
 

xHunter

Newbie
Full Member
Jun 12, 2017
22
87
1
Rake;49737 said:
entity lists are either arrays of player objects or an array of pointers to player objects. If it's an array of objects, loop distance works. If it's an array of pointers to dynamically allocated objects, then you will just use those pointers rather than a loopdistance
Let me see if I understand, I have to get the pointer of each player (in the case 32 players) and use type so separately?

C++:
struct Entity
{
	DWORD Player[32];
	void Read(int id)
	{
		if(id == 0)
			Player[0] = 0x000000;
		else if(id == 1)
			Player[1] = 0x000001;
		else if(id == 2)
			Player[2] = 0x000002;
		...
	}
}
 

xHunter

Newbie
Full Member
Jun 12, 2017
22
87
1
Rake;49742 said:
xHunter each pointer will be seperated by 4 bytes because that's the size of a pointer on 32bit and it looks like you're external so you would have to ReadProcessMemory

something like

C++:
DWORD playerPtrArray = whatever;
DWORD Player[32];

for (int i = 0, i < numPlayers; int++)
{
ReadProcessMemory(hProc, (LPVOID)(platerPtrArray + i * 4), &Player[i], 0);
}
now each element of Player[32] is a the address of a player, you will have to extend and modify for your game and error checking/sanity checks
C++:
ReadProcessMemory(hProc, (DWORD)hwBase+0x19550, &playerPtrArray, sizeof(DWORD), NULL);
playerPtrArray += 0x4AC4; // offset level 1

for (int i = 0, i < numPlayers; i++)
{
       ReadProcessMemory(hProc, (LPVOID)(platerPtrArray + i * 4), &Player[i], sizeof(DWORD), 0);
}
The method I'm doing is right?
 
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