Lua Scripted NPC spawn loc.

Can anyone tell me how I would set the spawn location for a Scripted NPC to spawn every time the server crashes or something?

Type GetPos in Console to get the cordinates, and do this:



hook.Add("InitPostEntity", "ShopNPCSpawning", function()
	local npc = ents.Create("your_ent")
	npc:SetPos(Vector(0,0,0))
	npc:SetAngles(Angle(0,0,0))
	npc:Spawn()
end)


thanks monkey
<3

that goes in the client shared or server? I’d think server, but I’m horrible at coding.

Server, since it’s the server spawning it, and not a player.