Solved Number of Players

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
Hi,

Is there any engine.dll or client.dll (or any other .dll) function that returns the number of players currently in game?

Thanks.
 

neonplanet

Newbie
Meme Tier VIP
Dank Tier Donator
Sep 7, 2017
248
4,078
13
Function to read players in game:
int ReadMem::ReadNumberOfPlayers()
{
    int Players = 0;
    ReadProcessMemory(PI.GameHandle, (LPVOID)(PI.ClientModule + Offset.NumOfPlayers), &Players, sizeof(int), NULL);
    return Players;
}
Offsets
Offset for number of players:
const DWORD NumOfPlayers {0x65E954};

Just write a simple read memory and store the amount in an int and there you go.




EDIT: This works on online servers as well not just sandbox.
 
Last edited:
  • Like
Reactions: Rake

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
idx[0];50120 said:
Hi,

Is there any engine.dll or client.dll (or any other .dll) function that returns the number of players currently in game?

Thanks.
CSS, CSGO, CS 1.6, Insurgency, Left 4 dead, team fortress 2? Be specific
 

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
I dont know any dll's that does it but If you are using lua then you can use #player.GetAll( )
And you want to see if a dll holds the player number then you can pretty much create a empty server, make a bot join or a friend, then scan with cheat engine till you get the address hopefully it wont be server.dll
 
Last edited:

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
I dont know any dll's that does it but If you are using lua then you can use #player.GetAll( )
And you want to see if a dll holds the player number then you can pretty much create a empty server, make a bot join or a friend, then scan with cheat engine till you get the address hopefully it wont be server.dll
I already looked for a static address that holds the number of players and found it but it only works on a specific gamemode (Sandbox)
Guess I need to look harder.
 

Teuvin

now I am become Death
Dank Tier VIP
Trump Tier Donator
Dec 8, 2016
403
10,388
65
idx[0];50154 said:
I already looked for a static address that holds the number of players and found it but it only works on a specific gamemode (Sandbox)
Guess I need to look harder.
If you are hacking GMOD then you should def go for lua coding instead of external/internal
 

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
Thanks but I prefer not to deal with CAC or any other anti-cheats.
 
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