Setting up Npc Spawners

hay coders i need help with this problem im trying to setup this spawner that spawns npcs i did an example for zombie

function ZombieSpawns()
local zombie1 = NPC.Create("npc_zombie")
--local zombie2 = ent.Create("npc_zombie")
--local zombie3 = ent.Create("npc_zombie")
--local zombie4 = ent.Create("npc_zombie")
--local zombie5 = ent.Create("npc_zombie")
--local zombie6 = ent.Create("npc_zombie")
--local zombie7 = ent.Create("npc_zombie")
--local zombie8 = ent.Create("npc_zombie")
--local zombie9 = ent.Create("npc_zombie")
--local zombie10 = ent.Create("npc_zombie")

zombie1:SetPos( vector(-393.009399, 5451.424316, -10111.968750));

timer.Create( "Ztimter", 10, 0, ZombieSpawns )

Research the function Entity:Fire( )
It allows you to fire entity inputs that are generally set in hammer.
If you use ent:Fire(“Toggle”, 0, “” ) I think that will turn a spawner on. I havn’t used it in a while so you should research the specifics of it’s usage on your own.

thats to do a fire but im making a custom spawner not fire spawner

… if you had actually googled the function you would know how retarded what you just said is…

To make a zombie you use

To fix your function:
function ZombieSpawns()
local zombie = ents.Create(“npc_zombie”)
zombie:SetPos( Vector( -393.009399, 5451.424316, -10111.968750 ) )
timer.Simple( 10, function() ZombieSpawns() end )

function StartZombieSpawning()
hook.Add(“InitPostEntity”, “StartZombieSpawning”, StartZombieSpawning) //This starts the function when the gamemode initializes and can work with entities

know the zombies are spawning YAYAYYAYA!!! thx Cep.