03-22-2017, 05:43 PM
It of course depends on what you want an item to do:
function OnPlayerRightClick(a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ) if (a_Player:GetEquippedItem().m_ItemType ~= <some custom item id>) then return false; end -- Add some custom handling like firing a projectile or something. endDon't forget to register the hook using cPluginManager:AddHook