improved

CS2 Match-API: New Connect Flow

We've just rolled out a new flow for our CS2 Match-API, aiming to offer players a smoother experience. Here's a quick rundown:

  1. The match starts off as an FFA Deathmatch during the warmup phase, with players randomly spawning across the map equipped with AK + Deagle. On connecting, all players are instantly added to the T-side and a chat message repeats every 20 seconds:

    “>>> Teams will be auto-assigned once all players are connected. Enjoy FFA DM for now! <<<”

  2. When everyone has connected to the match, it will start within the amount of time specified in the match_begin_countdown parameter. Players are notified via the warmup clock that gets adjusted accordingly.
  3. When the warmup has ended, the server switches to a competitive config, and players are auto-assigned to their teams, be it CT or T.
  4. We print out “>>> LIVE LIVE LIVE <<<” to the chat and the match kicks off!

 

Common Questions

How are spectators handled?

Spectators can be part of the match by whitelisting their Steam IDs before or during the match. They won't be automatically moved to the spectator slot; they need to do this themselves. If they don't move before the game starts, they will be kicked out.

 

Can players switch teams during the game?

No, team switching is blocked through:

  1. Server settings that maintain equal team sizes (mp_limitteams 1)
  2. A backup kicking feature that instantly kicks anyone attempting to change teams during the game, supporting the first layer of prevention.

 

Detailed Configuration Info

For those interested, here are specifics of the configurations applied at the start of warmup and when the match begins. Currently, these are hard-coded into the Match API, however, we're planning on allowing customizations to all commands in the near future.

mp_humanteam                "t"
mp_force_pick_time          "0"
mp_t_default_melee          "weapon_knife"
mp_t_default_secondary      "weapon_deagle"
mp_t_default_primary        "weapon_ak47"
mp_randomspawn              "1"
mp_randomspawn_los          "1"
mp_teammates_are_enemies    "1"
mp_maxmoney                 "0"
mp_humanteam                "any" 
mp_force_pick_time          "60"
mp_t_default_melee          "weapon_knife"
mp_t_default_secondary      "weapon_glock" 
mp_t_default_primary        "" 
mp_randomspawn              "0"
mp_randomspawn_los          "0" 
mp_teammates_are_enemies    "0"
mp_maxmoney                 "16000"
mp_team_intro_time          "0" 
mp_warmup_end
mp_restartgame 1 
say >>> LIVE LIVE LIVE <<<
say >>> LIVE LIVE LIVE <<<
say >>> LIVE LIVE LIVE <<<