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

NOTARGET

CS:GO

This command toggles whether or not bots are aware of your player. When this is enabled, bots will not attack you (or even react to you).

Syntax
notarget

Description

This command toggles whether or not bots are aware of your player. When this is enabled, bots will not attack you (or even react to you).

How To Use notarget

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter notarget, 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

notarget