Lua noob here! Is there any sort of function or code that will remove a players weapon on death or drop that I could simply copy and paste into the shared.lua of the weapon. Any help is greatly appreciated
This should be your solution
SWEP.AllowDrop = false function SWEP:OnDrop() self:Remove() end
Edited: Cleared it up for you
How would this work?
And also, to go slightly off topic, how do you get the grey box for the code? (for future reference )
Basically, it says: " If the weapon is dropped, remove the weapon "
Edited: That’s piece of cake, just wrap your code in code tags. Like when you quote, instead just write CODE and /CODE in the .