Hi! So basically, I am in need of help. I've scripted a Npc Shop that can be spawned through the entities menu. My only problem is getting it to spawn on server start
"local function SpawnEntities()
if SERVER then
local npc = ents.Create("npc_shop")
npc:SetPos(Vector(5002.4219,-3550.6282,228.0313))
npc:SetAngles(Angle(0,0,0))
npc:Spawn()
end
end
hook.Add( "InitPostEntity", "SpawnEntities", SpawnEntities)"
That was placed in my lua/autorun/server and nothing happend.. Even tried placing into the init.lua of my gamemode. Still nothing..
Any help is appreciated!
[lua]hook.Add( "InitPostEntity", "SpawnEntities", SpawnEntities)"[/lua]
You have an extra " at the end.
I'm not sure if that's the solution, but that's just something I saw and wanted to point out for you.
Also, try using [lua] tags.
No sorry, I didnt know the [lua] tags when posted. It's just there sorta as a quote. Not really there in the file itself ! ^^
Sorry, you need to Log In to post a reply to this thread.