Changing Maximum Player Count: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Thunder4ik (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Multiple issues| | |||
{{Dead end|date=January 2024}} | |||
{{Orphan|date=January 2024}} | |||
}} | |||
By default, Source modifications have a hard-coded maximum player count per server. This can often be overcome using certain server plugins, but if you want to change things the proper way for your modification, you'll need to manipulate your mod's source code a bit. | By default, Source modifications have a hard-coded maximum player count per server. This can often be overcome using certain server plugins, but if you want to change things the proper way for your modification, you'll need to manipulate your mod's source code a bit. | ||
=== Source 2007 (HL2MP) === | === Source 2007 (HL2MP) === | ||
* Open hl2mp_gameinterface.cpp and find the implementation of the following function: | * Open hl2mp_gameinterface.cpp and find the implementation of the following function: | ||
<source lang=cpp>void CServerGameClients::GetPlayerLimits( int& minplayers, int& maxplayers, int &defaultMaxPlayers )</source> | <source lang=cpp>void CServerGameClients::GetPlayerLimits( int& minplayers, int& maxplayers, int &defaultMaxPlayers )</source> | ||
You'll see an integer called "maxplayers", which has a default value of '16'. Change the '16' to whatever you'd like, but going higher than 32 is not recommended, and obviously don't go below whatever is defined for "minplayers". You can also change "defaultMaxPlayers" here if you'd like. | You'll see an integer called "maxplayers", which has a default value of '16'. Change the '16' to whatever you'd like, but going higher than 32 is not recommended, and obviously don't go below whatever is defined for "minplayers". You can also change "defaultMaxPlayers" here if you'd like. | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 08:50, 21 January 2024

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)

This article has no
links to other VDC articles. Please help improve this article by adding links
that are relevant to the context within the existing text.
January 2024


January 2024

This article is an orphan, meaning that few or no articles link to it.
You can help by
adding links to this article from other relevant articles.
January 2024
You can help by

January 2024
By default, Source modifications have a hard-coded maximum player count per server. This can often be overcome using certain server plugins, but if you want to change things the proper way for your modification, you'll need to manipulate your mod's source code a bit.
Source 2007 (HL2MP)
- Open hl2mp_gameinterface.cpp and find the implementation of the following function:
void CServerGameClients::GetPlayerLimits( int& minplayers, int& maxplayers, int &defaultMaxPlayers )
You'll see an integer called "maxplayers", which has a default value of '16'. Change the '16' to whatever you'd like, but going higher than 32 is not recommended, and obviously don't go below whatever is defined for "minplayers". You can also change "defaultMaxPlayers" here if you'd like.