How to turn off PvP in GMod
Type sbox_playershurtplayers 0 in the server console so players cannot damage each other. NPCs, falls and the world can still hurt them.
sbox_playershurtplayers
Toggles whether players can damage each other on a Sandbox server.
sbox_playershurtplayers <0|1> Examples
sbox_playershurtplayers 0 No PvP, NPCs can still hurt players.
Values
| Value | What it does |
|---|---|
| 0 | Off |
| 1Default | On |
Arguments
0|1Required- 1 allows PvP damage, 0 blocks it.
What it does
Switches player versus player damage on or off. With it off, players can still be hurt by NPCs, the world and falls. Set it to 0 for a friendly build server while keeping NPC fights possible.
The game's own description: If enabled, players will be able to hurt each other
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 garrysmod/cfg/server.cfg. New to this? Start a GMod server first.
Your own
GMod server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.