Wanders Inventory SystemAboutAboutContactContact (opens in a new tab)
DiscordDiscord (opens in a new tab)
  • Introduction
  • Config
    • Exampleconfig
    • Index
    • Recipes
  • Functions
    • Server
      • Additemtoinventory
      • Additemtoslot
      • Findemptyslot
      • Moveitemwithininventory
      • Removeitemamt
      • Removeitemfrominventory
      • Retrievedata
  • Items
    • Format
    • Custom
      • Internal
      • hooks
        • Equipitem
        • Onuse
        • Unequipitem
    • Data
      • Durability
      • Maxdurability
      • Rarity
      • Strength
      • Stats
        • Armor
        • Crafting Proficiency
        • Damage
        • Healing Efficiency
        • Health
        • Jump
        • Luck
        • Resistance
        • Slots
        • Speed
    • Types
      • Accessory
      • Chest
      • Feet
      • Head
      • Item
      • Legs
      • Stim
  • Introduction
  • About
  • Config
    • Exampleconfig
    • Index
    • Recipes
  • Functions
    • Server
      • Additemtoinventory
      • Additemtoslot
      • Findemptyslot
      • Moveitemwithininventory
      • Removeitemamt
      • Removeitemfrominventory
      • Retrievedata
  • Items
    • Format
    • Custom
      • Internal
      • hooks
        • Equipitem
        • Onuse
        • Unequipitem
    • Data
      • Durability
      • Maxdurability
      • Rarity
      • Strength
      • Stats
        • Armor
        • Crafting Proficiency
        • Damage
        • Healing Efficiency
        • Health
        • Jump
        • Luck
        • Resistance
        • Slots
        • Speed
    • Types
      • Accessory
      • Chest
      • Feet
      • Head
      • Item
      • Legs
      • Stim
  • Contact (opens in a new tab)

On This Page

  • EquipItem
  • Returns
  • Use Case
  • Example
Question? Give us feedback → (opens in a new tab)Edit this page
Items
Custom
hooks
Equipitem

EquipItem

hook.Add("WIS.EquipItem", "WIS.DefaultEquip", function(ply, item, inv) end)

Called when a item is equipped

Returns

NameTypeDescription
plyEntityThe player who equipped the item.
itemtableThe item that was eqipped.
invtableThe player who equipped the item's inventory.

Use Case

This hook is typically used for custom items

Example

hook.Add("WIS.EquipItem", "WIS.DefaultEquip", function(ply, item, inv)
    local funcs = customfuncs["OnEquip"]
    for _,v in pairs(funcs) do
        if item.name == _ then
            v(ply, item)
        end
    end
end)
InternalOnuse

Wanders Inventory System