Giving a player a new weapon on drop

So… Short story is - I’ve got weapon_ttt_knife, what I want to do is - When the knife is thrown or someone is stabbed to death, give the attacker/thrower a new knife.

I’ve tried doing the following on my server but it didn’t work -


hook.Add("PlayerDeath", kniferound, function(victim, inflictor, v)
		if v:IsValid() and v:IsPlayer() and v:Alive() then
			v:Give( "weapon_ttt_knife" )
			v:SetActiveWeapon ( "weapon_ttt_knife" )
		end
	end)


I’ve thought about adding hook to Drop but I don’t know what’s the name of the hook nor how to do it.
Thanks in advance

Untested it may or may not work



hook.Add("PlayerDeath", "kniferound", function(victim, inflictor, v)
			if v:IsValid() and v:IsPlayer() and v:Alive() then
				v:Give( "weapon_ttt_knife" )
		else
			if ( v:DropWeapon == "weapon_ttt_knife" ) then
				v:Give( "weapon_ttt_knife" )
		end
	end
end)



That code gives the weapon to the player while it is dead.