NB! It seems this console command is not compatible with CS2.
Command Profile

HUD_TAKESSHOTS

CS:GO

This command can be used to enable the auto-taking of a screenshot at the end of a match (when the scoreboard is up). Default is 0 (disabled).

Syntax
hud_takesshots [0 / 1]

Description

This command can be used to enable the auto-taking of a screenshot at the end of a match (when the scoreboard is up). Default is 0 (disabled).

How To Use hud_takesshots

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter hud_takesshots [0 / 1], replacing bracketed arguments with the value you want, then press Enter.

This legacy command is not currently listed as compatible with Counter-Strike 2.

Syntax And Arguments

hud_takesshots [0 / 1]
0 / 1 Enter 0 the disable the taking of screenshots at the end of a CS:GO game (default). Enter 1 to enable. The screenshot will be of the scoreboard.

Related Commands