This article's documentation is for anything that uses the Source engine. Click here for more information.

maxplayers

From Valve Developer Community
Jump to navigation Jump to search

maxplayers is a console variable available in all Source Source games. maxplayers is a server console variable that determines the maximum number of players that can join a game. It cannot be changed while a server is running.

The absolute player limit of Source is 255, though the number supported by most games is far lower. Usually the limit is 32.

Confirm:Doesn't seem like there is any non sourcemod way to change this in Left 4 Dead series Left 4 Dead series
Warning.pngWarning:In Counter-Strike: Global Offensive Counter-Strike: Global Offensive, maxplayers is deprecated. Set it in gamemodes_server.txt.example or use the launch option -maxplayers_override <number> instead.
Warning.pngWarning:In Counter-Strike 2 Counter-Strike 2, maxplayers_override is deprecated. Use the launch option -maxplayers <number> instead.

Usage

The engine can be put into single-player mode by setting maxplayers to 1 before a game starts. This bridges the normal client-server divide in several areas, eliminating latency and interpolation and opening backdoors like the one used by the inverse kinematics system. In Source 2013 Source 2013, enabling singleplayer mode additionally disables DRM, allowing the maps to be loaded without Steam running.

The entity indices 1 to <maxplayers> are reserved for player entities (0 is worldspawn).