Couple easy requests (Maybe)

This is the darkrp code to drop a weapon, I posted this in the wrong section before and now im posting it in the correct section, I would like to add a blacklist of weapons/items that are not allowed to be dropped when using /drop.

Also I don’t quite know if someone could whip this up quickly for me or its a complicated thing. Could you add a command to a swep to only allow damage if the other person has the swep equipped, thank you for reading over this and if anyone could complete this request I would be grateful.


function DropWeapon(ply)
	local ent = ply:GetActiveWeapon()
	if not ValidEntity(ent) then return "" end
	
	if CfgVars["RestrictDrop"] == 1 then
		local found = false
		for k,v in pairs(CustomShipments) do
			if v.entity == ent:GetClass() then
				found = true
				break
			end
		end
		if not found then
			Notify(ply, 1, 4, LANGUAGE.cannot_drop_weapon)
			return "" 
		end
	end
	ply:DropWeapon(ent)
	return ""
end
AddChatCommand("/drop", DropWeapon)
AddChatCommand("/dropweapon", DropWeapon)
AddChatCommand("/weapondrop", DropWeapon)

[lua]function DropWeapon(ply)
local ent = ply:GetActiveWeapon()
if not ValidEntity(ent) || ply:GetActiveWeapon() == “weapon_smg1” then return “” end[/lua]

you’d probably want to make a table reading one though, i haven’t the time to do it. but that’s an example