Skip to content
/SLASHPLAY

How to make NPCs ignore players in GMod

Type ai_ignoreplayers 1 in the server console and NPCs treat every player as invisible, while still fighting each other.

ai_ignoreplayers

Toggles whether NPCs ignore players, so hostile NPCs stop attacking people.

ai_ignoreplayers <0|1>

Examples

ai_ignoreplayers 1

Watch NPCs fight without being targeted.

Values

ValueWhat it does
0Default Off
1 On

Arguments

0|1Required
1 makes NPCs ignore players.

What it does

NPCs keep thinking and fighting each other but treat players as invisible. Good for watching NPC battles in Sandbox.

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.