Maxplayers: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Undo revision 261877 by Spermbiboba (talk))
Tag: Undo
mNo edit summary
Line 1: Line 1:
'''<code>maxplayers</code>''' is a server [[console variable]] that determines the maximum number of [[player]]s that can join a game. It cannot be changed while a server is running.
'''{{mono|maxplayers}}''' is a server [[console variable]] that determines the maximum number of [[player]]s 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.
The absolute player limit of Source is 255, though the number supported by most games is far lower. Usually the limit is 32.


{{Warning|In {{csgo}} [[Counter-Strike: Global Offensive]], <code>maxplayers</code> is deprecated. Set it in <code>gamemodes_server.txt.example</code> or use the [[Command Line Options|launch option]] <code>-maxplayers_override <number></code> instead.
{{Warning|In {{csgo}} [[Counter-Strike: Global Offensive]], {{mono|maxplayers}} is deprecated. Set it in {{mono|gamemodes_server.txt.example}} or use the [[Command Line Options|launch option]] {{mono|-maxplayers_override <number>}} instead.
}}
}}
{{note|In {{src13sp|4}}, {{mono|maxplayers}} is hardcoded to 1.}}


== Usage ==
== Usage ==


The engine can be put into single-player mode by setting <code>maxplayers</code> 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.
The engine can be put into single-player mode by setting {{mono|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.


The [[entity index|entity indices]] 1 to ''<maxplayers>'' are reserved for [[CBasePlayer|player entities]] (0 is [[worldspawn]]).
The [[entity index|entity indices]] 1 to ''<maxplayers>'' are reserved for [[CBasePlayer|player entities]] (0 is [[worldspawn]]).


[[Category:Glossary]]
[[Category:Glossary]]

Revision as of 16:02, 28 June 2023

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.

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.
Note.pngNote:In Source 2013 Singleplayer Source 2013 Singleplayer, maxplayers is hardcoded to 1.

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.

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