AddCSLuaFile()



ENT.Base             = "base_nextbot"

ENT.Spawnable        = false

ENT.AdminSpawnable   = false



--Stats--

--Model Settings--

ENT.Model = ("models/props_junk/popcan01a.mdl")



function ENT:BehaveStart()

end





function ENT:Precache()

end



function ENT:ModelHide()

self:DrawShadow(false)

self:SetNoDraw(true)

self:SetNotSolid(true)

end



function ENT:Initialize()

if SERVER then

	self:ModelHide()

	self:SetModel(self.Model)



	local randomspawn = math.random(1,9)

if randomspawn == 1 then self.random = ents.Create("npc_nextbot_classiczambie") end

if randomspawn == 2 then self.random = ents.Create("npc_nextbot_crawler") end

if randomspawn == 3 then self.random = ents.Create("npc_nextbot_poisonzombie") end

if randomspawn == 4 then self.random = ents.Create("npc_nextbot_wraith") end

if randomspawn == 5 then self.random = ents.Create("npc_nextbot_chemnormal") end

if randomspawn == 6 then self.random = ents.Create("npc_nextbot_boss") end

if randomspawn == 7 then self.random = ents.Create("npc_nextbot_checmcrab") end

if randomspawn == 8 then self.random = ents.Create("npc_nextbot_fasthcrab") end

if randomspawn == 9 then self.random = ents.Create("npc_nextbot_NormalCrab") end



	self.random:SetPos(self:GetPos())

	self.random:SetAngles(self:GetAngles())

	self.random:Spawn()

	self.random:Activate()



end

end



function ENT:Think()



	if not ( self.random:IsValid()) then 

	

if SERVER then

	local randomspawn = math.random(1,9)

if randomspawn == 1 then self.random = ents.Create("npc_nextbot_classiczambie") end

if randomspawn == 2 then self.random = ents.Create("npc_nextbot_crawler") end

if randomspawn == 3 then self.random = ents.Create("npc_nextbot_poisonzombie") end

if randomspawn == 4 then self.random = ents.Create("npc_nextbot_wraith") end

if randomspawn == 5 then self.random = ents.Create("npc_nextbot_chemnormal") end

if randomspawn == 6 then self.random = ents.Create("npc_nextbot_boss") end

if randomspawn == 7 then self.random = ents.Create("npc_nextbot_checmcrab") end

if randomspawn == 8 then self.random = ents.Create("npc_nextbot_fasthcrab") end

if randomspawn == 9 then self.random = ents.Create("npc_nextbot_normalcrab") end



	self.random:SetPos(self:GetPos())

	self.random:SetAngles(self:GetAngles())

	self.random:Spawn()

	self.random:Activate()



	self:NextThink(CurTime() + .5)

end

end

end

