Looping Through Online Entities

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
So I've been trying to get my radar to work online, but since there's no NumOfPlayers variable, I'm kinda stuck. The way I read guarantees that I'll crash if I read from the wrong entity. Using IsBadReadPtr (I know, it's one of those things you should never ever use), I've been able to actually run the aimbot and Radar online without crashing. The issue is that it's only one dot that lies in a random spot around the map. If anyone knows of a better way to handle pointers, or a way I can loop through the entities without worry of going over the amount there are, I'd be grateful if you shared!

Also, if there's anything I need to share, or I've missed please inform me.

C++:
PlayerList[i].ReadInformation(i);
PlayerList[i].ReadPosition(i);

if (IsBadReadPtr(PlayerList[i].Health, 4) != 0 || IsBadReadPtr(PlayerList[i].Team, 4) != 0 || IsBadReadPtr(PlayerList[i].Position[0], 12) != 0)
	continue;

C++:
struct PlayerList_t
{
	int LoopDist;
	DWORD Address;

	int * Team;
	int * Health;
	float * Position[3];
	float * AimbotAngle[3];

	void ReadInformation(int Player)
	{
		LoopDist = (Player * 0x4);

                //Read Team
		Address = *(DWORD*)0x50F4F8 + LoopDist;

		if (Address != NULL)
		{
			Address = *(DWORD*)Address + 0x32C;

			if (Address != NULL)
			{
				Team = (int*)Address;
			}

			else
			{
				Team = NULL;
			}
		}

		else
		{
			Team = NULL;
		}
		
                //Read Health
		Address = *(DWORD*)0x50F4F8 + LoopDist;

		if (Address != NULL)
		{
			Address = *(DWORD*)Address + 0xF8;

			if (Address != NULL)
			{
				Health = (int*)Address;
			}

			else
			{
				Health = NULL;
			}
		}

		else
		{
			Health = NULL;
		}
	}

	void ReadPosition(int Player)
	{
		int j = 0;
		LoopDist = (Player * 0x4);

		for (int i = 0x4; i <= 0xC; i += 0x4)
		{
			Address = (DWORD)0x50F4F8 + LoopDist;
			if (Address != NULL)
			{
				Address = *(DWORD*)Address + i;

				if (Address != NULL)
				{
					Position[j] = (float*)Address;
				}

				else
				{
					Position[j] = NULL;
				}
			}

			else
			{
				Position[j] = NULL;
			}

			j++;
		}
	}
}PlayerList[64];
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
ac_client.exe+10A22C

Including you. So -1
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,099
78,998
2,373
I'm still going through the SDK and noticed a function that retrieves the client address for you. The function also checks whether the client at the given index is valid or not. Just make sure to double check the returned address. :)
C++:
typedef DWORD (_fastcall *_GetClientById)(int cn);
_GetClientById GetClientById = _GetClientById((DWORD)GetModuleHandle(NULL) + 0x27320);

for (int i = 0; i < 32; ++i) {
    playerent* FakeEntity = (playerent*)GetClientById(i);

    if (!FakeEntity)
        continue;

 // Handle the entity here...
}
Here's a picture of it.

 

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
I'm still going through the SDK and noticed a function that retrieves the client address for you. The function also checks whether the client at the given index is valid or not. Just make sure to double check the returned address. :)
C++:
typedef DWORD (_fastcall *_GetClientById)(int cn);
_GetClientById GetClientById = _GetClientById((DWORD)GetModuleHandle(NULL) + 0x27320);

for (int i = 0; i < 32; ++i) {
    playerent* FakeEntity = (playerent*)GetClientById(i);

    if (!FakeEntity)
        continue;

 // Handle the entity here...
}
Here's a picture of it.

Nice find! That will definitely come in handy
 

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
AnomanderRake It works in multiplayer :D

You'll still have to use Spock's function, as the game still crashed for me.
Spock, how exactly does that work? You enter in the client number and it returns that address?
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,099
78,998
2,373
@AnomanderRake It works in multiplayer :D

You'll still have to use SomeGuy's function, as the game still crashed for me.
@SomeGuy, how exactly does that work? You enter in the client number and it returns that address?
That's basically it. Just make sure to check the returned value. :)
 
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