How to turn on god mode in CS2
Run sv_cheats 1, then type god in the console and you take no damage. Type it again to turn it off.
god
Toggles god mode, making you take no damage.
god [0|1] Examples
god Toggle god mode.
Arguments
stateOptional1on,0off. No argument toggles.
What it does
Pass 1 or 0 to force it on or off. Requires sv_cheats 1.
The game's own description: Toggle by default, or 0 to disable and 1 to enable. Player becomes invulnerable.
Run it on your server
On a SLASHPLAY server, type it in the Console tab of the server page; the reply shows right under it. A value set there lasts until the server restarts. To keep it, add the line to game/csgo/cfg/server.cfg. New to this? Start a CS2 server first.
Your own
CS2 server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.