Anyway to change session settings during runtime?

Hello, I was curious if it’s possible to change server settings while the server is running, for example max public connections from 4 to 3 when player leaves, so no others can join server till the match is over. What I’m trying to do is once players go through lobby(selection screen, no others can join that particular server) I am aware of kick commands, but for matchmaking won’t really work. Any ideas? Thanks in advance!

You shouldn’t be changing the max players at runtime. The player count will change as a result of players being registered with a session when they join, and unregistered when leaving, and the logic that checks if the server is full or if slots are available compares the number of players to the max players. It doesn’t expect you to dynamically alter the max players.

suppose is a session for a car race that allows 4 public connections…
you start the race with just 2 cars. then you dont want to get new racers
if the race started already so woukd be good to be able to change public connections
to 2 so the server is not published during the race.

How do you actually approach this case?