Skip to content
/SLASHPLAY

How to kill NPCs with a command in GMod

With sv_cheats 1 on, type npc_kill npc_zombie in the console to kill every zombie, or npc_kill alone to kill the NPC you are looking at.

npc_kill

Kills the NPCs you name, or the NPC you are looking at if no name is given; needs sv_cheats 1.

npc_kill [name|class]

Examples

npc_kill

Kill the NPC you are aiming at.

npc_kill npc_zombie

Kill all zombies.

Arguments

name|classOptional
NPC name or class, leave empty for the NPC under your crosshair.

What it does

Accepts an entity name or class, so npc_kill npc_zombie kills every zombie.

The game's own description: Kills the given NPC(s) Arguments: {npc_name} / {npc_class_name} / no argument picks what player is looking at

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.