Skip to content

CanEquipItem

Usage

  • Return a bool value to override default behavior

Example Autogenerated

csharp
private bool? CanEquipItem( PlayerInventory instance, Item item, int targetSlot, BasePlayer player )
{
    Puts( "CanEquipItem works!" );
    return null;
}

Location

  • PlayerInventory::CanEquipItem(BasePlayer player, Item item, int targetSlot)
csharp
private bool CanEquipItem(BasePlayer player, Item item, int targetSlot)
{
	object obj = Interface.CallHook("CanEquipItem", this, item, targetSlot, player);
	if (obj is bool)
	{
		return (bool)obj;
	}
	if ((item.info.flags & ItemDefinition.Flag.NotAllowedInBelt) != 0)
//---

Released under the MIT License.