Maxplayers: Difference between revisions
(Tisn't.) |
mNo edit summary |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{this is a|console variable|engine=Source|name=maxplayers}} | ||
'''{{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. | '''{{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. In some games it is usually 1 over the expected limit to account for the fake [[SourceTV]] client. | ||
{{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. | {{confirm|Doesn't seem like there is any non sourcemod way to change this in {{L4ds|4}}}} | ||
}} | {{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.}} | ||
{{Warning|In {{cs2}} [[Counter-Strike 2]], {{mono|maxplayers_override }} is deprecated. Use the [[Command Line Options|launch option]] {{mono|-maxplayers <number>}} instead.}} | |||
{{Warning|In {{cs2}} [[Counter-Strike 2]], {{mono|maxplayers_override }} is deprecated. Use the [[Command Line Options|launch option]] {{mono|-maxplayers <number>}} instead. | |||
}} | |||
== Usage == | == Usage == | ||
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. In {{src13|2}}, enabling singleplayer mode additionally disables DRM, allowing the maps to be loaded without Steam running. | |||
The | The [[entity index|entity indices]] 1 to ''<maxplayers>'' are reserved for [[CBasePlayer|player entities]] (0 is [[worldspawn]]). | ||
== Limits == | |||
* {{gmod|2}} - 128 | |||
* {{tf2|2}}, {{hl2dm|2}} - 101 (33 on 32-bit if not using <code>-unrestricted_maxplayers</code> launch option) | |||
* {{css|2}} - 65 | |||
* {{csgo|2}} - 64 | |||
* {{dods|2}} - 33 | |||
{{todo|Other games}} | |||
:{{Warning|In {{tf2branch|4}} games, the minimum value is 2, disallowing singleplayer mode. This can be changed for SDK projects by modifying the game DLL{{how}}, but this version of the engine currently has major bugs in singleplayer mode.}} | |||
[[Category:Glossary]] | [[Category:Glossary]] |
Latest revision as of 11:24, 29 April 2025
maxplayers
is a console variable available in all 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. In some games it is usually 1 over the expected limit to account for the fake SourceTV client.







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, 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).
Limits
Garry's Mod - 128
Team Fortress 2,
Half-Life 2: Deathmatch - 101 (33 on 32-bit if not using
-unrestricted_maxplayers
launch option)Counter-Strike: Source - 65
Counter-Strike: Global Offensive - 64
Day of Defeat: Source - 33
Warning:In
Team Fortress 2 branch games, the minimum value is 2, disallowing singleplayer mode. This can be changed for SDK projects by modifying the game DLL[How?], but this version of the engine currently has major bugs in singleplayer mode.