Dropping Weapons When dead!

I want to try make it so that when a guard or a prisoner dies on Jailbreak they drop all there weapons so other players can get them.

Here you go :slight_smile:

Google it? My Daddy never told me how to do that! thank you!!!

Hahah its ok

Also dunno what funtion to add it to :frowning: http://www.facepunch.com/showthread.php?t=1254481
Complicated :?

No, you dont add it to a function, it is a function,

[lua]hook.Add(“DoPlayerDeath”, “DropWeapon”, function(ply)
local wep = ply:GetActiveWeapon()
if (wep:IsValid()) then
ply:DropWeapon(wep)
end
end)[/lua]

Add that to a server-side file.

So I’m guessing that goes anywhere in sv_player_hooks?

[editline]26th June 2013[/editline]

or sv_hooks?