Solved CounterStrike Entity List

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

PwndDepot

I has a status
Dank Tier VIP
Trump Tier Donator
Dank Tier Donator
Nov 5, 2014
239
7,748
19
I'm trying to port fleep's external css aimbot to an internal one and i'm having so many fucking problems with the entity list.
I know it's the right entity list because I followed fleep's tutorial and did the external aimbot and it works fine.

My program crashes when I try to loop through the entity list (when there are enemies). I think ReadProcessMemory does some checking which prevents a crash maybe? Which explains why it would work in the external one and not my internal. Basically, my program is trying to access an entity that isn't there.

I noticed that the entity list isn't in order at all
https://prntscr.com/as7maa
The interval between each entity is 0x10 but sometimes an entity won't exist for another 0x10 or 0x20.
Notice in the screenshot how a pointer doesn't exist at offset 0x30 and 0x40 but one exists at 0x50

C++:
struct EntityList_t
{
	DWORD CBaseEntity;
	int Team;
	int Health;
	float Position[3];
	float AimbotAngle[3];

	void ReadInformation(int player)
	{
		MODULEINFO mInfo = GetModuleInfo("client.dll");
		DWORD base = (DWORD)mInfo.lpBaseOfDll;
		CBaseEntity = (DWORD)base + g_dwEntityPlayerBase + (player * g_dwEntityLoopDistance);
		Team = *(int*)(*(DWORD*)CBaseEntity + g_dwTeamOffset);
		Health = *(int*)(*(DWORD*)CBaseEntity + g_dwHealthOffset);
		Position[0] = *(float*)(*(DWORD*)CBaseEntity) + g_dwPosOffset;
		Position[1] = *(float*)(*(DWORD*)CBaseEntity) + g_dwPosOffset + 0x4;
		Position[2] = 0;
	}

}EntityList[32];
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
Find a condition that is only true when it is a valid entity, and check for it
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
Also, your image tells nothing, just because Cheat engine doesnt think its a pointer, doesnt mean it isnt, forcibly set the element to type of 4 bytes ( or maybe its pointer, cant remember, i dont use ce for this ), and then if the pointed to value is actually 0, then yeah, theres a null entity there, which you can yourself check by dereferencing and seeing if the value is 0

Now for some nitpicking

Why do you set the players final position to 0? the Z position is pretty important

At the start of the cheat, you should get the base of client.dll and save it, instead of grabbing it each time, ( GetModuleHandleA("client.dll") )

likewise, get the entity list base once

and instead of dereferencing the entity pointer multiple times, dereference it once and then read the data you want from that location
 
Last edited:

PwndDepot

I has a status
Dank Tier VIP
Trump Tier Donator
Dank Tier Donator
Nov 5, 2014
239
7,748
19
Also, your image tells nothing, just because Cheat engine doesnt think its a pointer, doesnt mean it isnt, forcibly set the element to type of 4 bytes ( or maybe its pointer, cant remember, i dont use ce for this ), and then if the pointed to value is actually 0, then yeah, theres a null entity there, which you can yourself check by dereferencing and seeing if the value is 0

Now for some nitpicking

Why do you set the players final position to 0? the Z position is pretty important

At the start of the cheat, you should get the base of client.dll and save it, instead of grabbing it each time, ( GetModuleHandleA("client.dll") )

likewise, get the entity list base once

and instead of dereferencing the entity pointer multiple times, dereference it once and then read the data you want from that location
You can thank Fleep for my bad programming practices :fleep:

The z axis = 0 was taken straight from fleep's source. But how is it important in an aimbot? Why do I need to deal with a 3rd deminsion when coding an aimbot? I took your advice and did a check on the entity list by dereferencing and checking for 0, and fixed a few bugs and now it works flawlessly :)
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
Having no player Z positions would be the equivalent of thinking that every single planet on the solar system are on the same XY plane, and the only thing separating them is horizontal and vertical distance, which isn't the case, you also have to deal with depth, some things have the exact same XY (yknow, give or take.) , but very different depths
 

Lovelace

Jr.Coder
Full Member
Nobleman
Oct 23, 2015
83
938
5
Z coordinate is technically where the aimbot's calculated pitch relies on, and so does w2s (to display them on screen correctly).
 

Amonomen

Resident A$$hole
Dank Tier Donator
May 1, 2016
22
373
1
You COULD ignore Z axis in a game where there are no height differences between players. (IE, players are always at the same level). That is rarely the case. Furthermore, not using Z would also make your aimbot ONLY aim left and right, not up and down.

As for finding the correct pointers using data dissect, I recommend not letting it guess the data types and such but manually adding them. In your case, you know each pointer is 0x10 away from the last. Simply create a new structure and tell it no, you don't want it to guess the data types. Right click anywhere in the window and you can add a new entry. (Ins is the shortcut key). Specify the offset and set the type as pointer. I don't really like the guess feature of the data dissect tool in CE because it can tend to be misleading.

I assume since this is a port of Fleep's, it's for CS:S? I'm having a hell of a time with CS:GO myself. Though, I think your post may have just lit the way for me, as I was not aware the entity list is a list of pointers. Other games I have messed with appear to keep the entity list in a contiguous array in memory, it seems Source engine does not.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
Other games I have messed with appear to keep the entity list in a contiguous array in memory, it seems Source engine does not.
Source engine uses an array of entity object pointers.
 
Last edited:
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