How would you go about to remove all the weapons in a map?

well i found some weapons in a map that i don’t want there how do i remove them?

[lua]
local function RemoveWeps()
for k,v in pairs(ents.GetAll()) do
if string.find(v:GetClass(),“weapon_”) ~= nil then
v:Remove()
end
end
end
hook.Add(“InitPostEntity”,“RemoveWeps”,RemoveWeps)
[/lua]

hmm care to explain what your doing with?
[lua]
~= nil then
[/lua]

[lua]if string.find(v:GetClass(),“weapon_”) then[/lua]

[lua]if v:IsWeapon() then[/lua]

I wasn’t saying that was the best way of doing it, I was just showing that Gbps was doing a pointless comparison.

Well, I mostly make that comparison to specify that the return I wish for is not nil. I don’t feel particularly safe leaving a window open for extra input (such as a boolean)