How to disable certain weapon for player dropping / trading

I’ve made several Weapon for special player, anyone know how to disable a weapon for dropping or give function for the esx_inventoryhud ?

My server running ESX 1.1

Hey :slight_smile: !
The following lines in [es_extended/server] are the one who deals with an weapon when it gets drop. You can see the line that create the pick up item here :

What you could do is adding a condition for the special weapons you are talking about :

if ( not (itemName == "SpecialWeapon1" or itemName == "SpecialWeapon2")  ) then

    ESX.CreatePickup('item_weapon', itemName, weapon.ammo, pickupLabel, playerId, components, weapon.tintIndex)

end

This will make it so that a pickable item will be created only if the weapon isn’t SpecialWeapon1 or SpecialWeapon2. You can modify the name of the weapons and add more : or itemName == "SpecialWeapon3".

Will try this today, thank you!