Drop weapons

Can someone make a script where you could drop your weapons?
Now when you die, just anytime.

I do believe this was already made; http://www.garrysmod.org/downloads/?a=view&id=19519

[lua]concommand.Add(“Drop” , function( p , c , a )
for k , v in ipairs(p:GetWeapons()) do
p:DropWeapon(v)
end
end )[/lua]?

That looks cool, FlapJack, but could you make it so that when you die, you drop any weapon that isn’t:

weapon_physcannon
weapon_physgun
weapon_toolgun
weapon_camera
weapon_mad_fists
weapon_mad_gnome
weapon_mad_medic

To fix the problem of them flying through the air, they could all be no-collided to each other. (the bottom three have no model (minus the medic one) and would just be small, invisible cubes that would begin polluting the server D: and the medic one has bad physics, and all players spawn with it on my server)

Basically a secondary request, I don’t feel like making another thread and maybe somebody who came in here looking for the same thing will find it useful.

I’m also wondering if you could maybe put in the same script, something that deletes all weapons (delete weapon_* would work i think) just in case nobody ends up picking up any weapons they find and it starts lagging.

Do you mean “not when you die?”

http://www.garrysmod.org/img/?t=dll&id=85426
http://www.garrysmod.org/img/?t=dll&id=84015

oh whoops, my hand kinda flew across the keyboard :stuck_out_tongue: