[lua]
function GM:Initialize( )
for _,v in ipairs(ents.GetAll()) do
if (v:GetClass():find"weapon" and IsValid(v:GetPhysicsObject()) and not IsValid(v:GetOwner())) or v:GetClass():find"item" then
v:Remove()
end
end
end
[/lua]I am wanting to remove all weapons and ammo that are in the loaded map.
That's what i got so far, and it doesn't appear to be working.
Any help would be great.
Change it from Initialize to InitPostEntity and see where that gets you. Last I checked, Initialize is ran before entities are created.
Worked like a charm.
Thanks Kogitsune!
Sorry, you need to Log In to post a reply to this thread.