well i found some weapons in a map that i don’t want there how do i remove them?
local function RemoveWeps()
for k,v in pairs(ents.GetAll()) do
if string.find(v:GetClass(),“weapon_”) ~= nil then
hmm care to explain what your doing with?
~= nil then
[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)