How can I limit each team to have 5 players each and have 2 spectators in my CSGO server?

I currently have a CS:GO server that holds up to 12 players but I don't want to have it so its a 6v6. I would like so the teams are limited to 5 players each and there can be 2 spectators watching until a slot opens up.
If anyone knows a way to do this (preferablly with the.cfg's I would greatly appreciate it. I am running the configs mainly with the server.cfg and gamemode_competitive.cfg
Best Answer
Take your config and edit the following lines to your needs:
`mp_spectators_max "2" // How many spectators are allowed in a match.`
`maxplayers "10"`
and you could try this as bonus to make it "competitive"
sv_competitive_official_5v5 "0" // Enable to force the server to show 5v5 scoreboards and allows spectators to see characters through walls.
If you need anything else, here is a link with 2483 console commands (not sure if that are all available commands but definitely all you'll ever need)
Update:
So that the commands dont work I just found that there is a -maxplayers_override command but i dont know if this still works. However there is an entry on the Valve Dev Page about this problem which you could try. I just found another comment in the steam forum which seems to be important.
The maxplayers command must be above the convars segment. Put that maxplayer into the gamemode part you are trying to change.
You have to write the following in the gamemodes/gamemodes_server.txt
"GameModes_Server.txt"
{
"gameTypes"
{
"classic"
{
"gameModes"
{
"competitive"
{
maxplayers "6"
}
}
}
}
}
Pictures about "How can I limit each team to have 5 players each and have 2 spectators in my CSGO server?"



How do you add more than 5 players in CS:GO?
How do I enable spectators in CS:GO?
It can be enabled using the "Radio Responses/Reports" key (default: C). It automatically switches the spectated player to the current most important event during match.How do I change my max players in CS:GO console?
If you're using command line or a shortcut to launch the server, you can add +maxplayers # at the end of the line/shortcut target to launch the server with max players set to #, where # is the desired max number of players.How many people are on a team in CS:GO?
Competitive mode, the primary gameplay experience, pits two teams of five players against each other in a best-of-30 match. When playing Competitive, players have a skill rank based on a Glicko rating system and are paired with and against other players around the same ranking.Setup a CSGO Server (STEAM CMD) | Server.cfg \u0026 Configs
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Joe Calomeni, Iserlohn Titans, Kampus Production, Geometric Photography