# GetStartupPlayerCount

Player
5.4 OC
int
Returns the number of players scheduled to join the game when it intiially started. This value is determined before game start, so it can be used in early scenario initialization functions such as Initialize or InitializeMap.
The startup player count is not updated when a savegame is resumed with a different number of players.
The number of players actually joining the game might be lower due to clients disconnecting at game start or players trying to join with invalid player files. To get a reliable number of players, handle player joins and leaves directly in InitializePlayer and RemovePlayer callbacks or call GetPlayerByCount shortly after game start.
GetPlayerCount
Sven2
2013-03