Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add("Tick","SAreas_Tick",function()
- for _,v in pairs(SAREAS.Areas) do
- local ents = ents.FindInBox(v[1]-v[2]/2-Vector(0,0,99999999), v[1]+v[2]/2+Vector(0,0,99999999))
- for __,ent in pairs(ents) do
- --if(ent:IsPlayer() and IsAreaOwner(ent, _) == false) then ent:Kill() end
- if CPPI then
- local owner = ent:CPPIGetOwner() or ent:GetOwner() or Entity(0)
- if(IsAreaOwner(owner, _) == false and (ent:GetClass() == "prop_physics" or ent:GetClass() == "prop_static" or ent:IsNPC() or ent:IsVehicle())) then ent:Remove() end
- else
- local owner = ent:GetOwner() or Entity(0)
- if(IsAreaOwner(owner, _) == false and (ent:GetClass() == "prop_physics" or ent:GetClass() == "prop_static" or ent:IsNPC() or ent:IsVehicle())) then ent:Remove() end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement