Message Manager
C4Messages.h

MessageMgr::SetMaxPlayerCount

Sets the maximum number of players that the server will allow in a multiplayer game.
Prototype

void SetMaxPlayerCount(long count);

Parameters
count The maximum number of players.
Description
The SetMaxPlayerCount function should be called on the machine hosting a multiplayer game to set the maximum number of players allowable. The SetMaxPlayerCount function should be called prior to calling the MessageMgr::BeginMultiplayerGame function since it is this function which tells the Network Manager how many connections may be accepted.
See Also
MessageMgr::GetMaxPlayerCount

MessageMgr::GetPlayerCount