Bug 5757 - MaxClients wrong on CS:GO
MaxClients wrong on CS:GO
Status: RESOLVED INVALID
Product: SourceMod
Classification: Unclassified
Component: Core
master
All All
: P5 enhancement
Assigned To: SourceMod Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-11 13:26 PDT by hlstriker
Modified: 2013-06-11 17:54 PDT (History)
3 users (show)

See Also:


Attachments

Description hlstriker 2013-06-11 13:26:18 PDT
MaxClients seems to always return 64 on CS:GO.
Comment 1 Nicholas Hastings [:psychonic] 2013-06-11 13:57:01 PDT
This is normal and is the actual engine MaxClients value, the one that can only change at map load (for SourceTV joining/leaving or otherwise).

You are looking for the game's dynamic max clients, controlled by CS:GO's gametypes system in this case.

Use GetMaxHumanPlayers. It's new with L4D and any game that came after.

http://hg.alliedmods.net/sourcemod-central/file/c604c6143dfb/plugins/include/clients.inc#l212
Comment 2 hlstriker 2013-06-11 15:20:40 PDT
Thank you, I had no idea that function exists. Everything is working as expected now with GetMaxHumanPlayers.

Note You need to log in before you can comment on or make changes to this bug.