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
[CODE]SWEP.AllowDrop = false
function SWEP:OnDrop()
self:Remove()
end[/CODE]
[B]Edited:[/B] Cleared it up for you
function SWEP:OnDrop()
self:Remove()
How would this work?
And also, to go slightly off topic, how do you get the grey box for the code? (for future reference :) )
[QUOTE=Baron von Hax;43670286]function SWEP:OnDrop()
self:Remove()
How would this work?[/QUOTE]
Basically, it says: " If the weapon is dropped, remove the weapon "
[B]Edited:[/B] That's piece of cake, just wrap your code in code tags. Like when you quote, instead just write CODE and /CODE in the [].
Sorry, you need to Log In to post a reply to this thread.