Solved Problem with reading entity list, csgo

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

cghacking

Newbie
Full Member
Apr 23, 2017
9
32
0
I apologize for another newbie post.... the goal of my code is to output the team numbers of every player in entity list. it comes out with this output with a game of 10 players: https://gyazo.com/6f2dce10c4c2a6e0f9cddabb65450d2b
My offsets are correct... No idea why this is happening, please explain ;;

C++:
struct PlayerList {
	DWORD currentEntity;
	int teamNum;

	
	
}PlayerList[32];


bool ReadPlayerList(DWORD client, int i) {
	HANDLE hProcess;
	DWORD pid;
	pid = mod.GetPid();
	hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pid);


	

	ReadProcessMemory(hProcess, (PBYTE*)(Entity_List + client) + (i * 0x10), &PlayerList[i].currentEntity, sizeof(DWORD), 0);
	if (PlayerList[i].currentEntity == NULL) {
		CloseHandle(hProcess);
		return false;
	}
	ReadProcessMemory(hProcess, (PBYTE*)(PlayerList[i].currentEntity + TeamOffset), &PlayerList[i].teamNum, sizeof(int), 0);

}
in main:

C++:
for (int i = 0; i < 32; i++) {
		if (!ReadPlayerList(client, i)) 
		{
			break;
		}
	}
	for (int i = 0; i < 32; i++) {
		cout << PlayerList[i].teamNum << endl;
	}
 

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
Why are you using 2 for loops?
You can just
C++:
for (int i = 0; i < 32; i++) {
		if (!ReadPlayerList(client, i)) 
		{
			continue;
		}
std::cout << PlayerList[i].teamNum << std::endl;
	}
You are reading a DWORD into a byte
C++:
 ReadProcessMemory(hProcess, (PBYTE*)(Entity_List + client) + (i * 0x10), &PlayerList[i].currentEntity, sizeof(DWORD), 0);
and try doing
C++:
(PDWORD*)((Entity_List + client) + (i * 0x10))
 
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