Hello, I need script that will automaticly spawn entities when server starts. Does anyone know who to do this or have script like this? I know thta FPtje make something like this but it spawns only props.
Please help
Anyone?
Quick script I put togheder, not sure if it works. Create a .lua file in the autorun folder.
[lua]hook.Add("InitPostEntity", "AddExtraEntities", function()
if game.GetMap() == "gm_construct" then
local prop = ents.Create("prop_physics")
prop:SetModel("models/sf/block_3d_1x2.mdl") //This requires the "Sourceforts Model Pack"
prop:SetPos( Vector( 0, 0, 0 ) )
prop:SetAngles( Angle(0,0,0) )
prop:Spawn()
local prop = ents.Create("prop_physics")
prop:SetModel("models/sf/block_3d_1x2.mdl") //This requires the "Sourceforts Model Pack"
prop:SetPos( Vector( 0, 0, 64 ) )
prop:SetAngles( Angle(0,0,0) )
prop:Spawn()
end
end )[/lua]
Sorry, you need to Log In to post a reply to this thread.