Skip to content
/SLASHPLAY

How to spawn NPCs in GMod

Type gmod_spawnnpc npc_combine_s weapon_ar2 in your game console to spawn a Combine soldier holding an AR2 where you look. sbox_maxnpcs still applies.

gmod_spawnnpc

Spawns an NPC where you are looking, the same way the Sandbox spawn menu does, with an optional weapon.

gmod_spawnnpc <npc> [weapon]

Examples

gmod_spawnnpc npc_combine_s weapon_ar2

Combine soldier with an AR2.

gmod_spawnnpc npc_zombie

Spawn a zombie.

Arguments

npcRequired
NPC class or list name, for example npc_combine_s.
weaponOptional
Weapon class to give the NPC.

What it does

Uses the NPC list names from the spawn menu and respects sbox_maxnpcs. You can bind it to a key to spawn a favorite NPC quickly.

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.