Hooks
Use Case Examples
API Functions
Register a Hook
exports['jaksam_inventory']:registerHook(eventName, callback, options, priority)Unregister a Hook
Unregister All Resource Hooks
Options Parameter
Common Filters (All Events)
Inventory Filters (onItemAdded, onItemRemoved, onInventoryCreated)
Transfer Filters (onItemTransferred only)
Available Hook Events
onItemAdded
onItemRemoved
onItemTransferred
onPreUseItem
onPostUseItem
onInventoryCreated
Hook Behavior
Quick Examples
Block Police Weapons in Player Inventory
One Backpack Per Player
Simple Crafting (Drag Items Together)
Filter by Specific Inventory Name
Block Item Usage When Handcuffed
Block Food Usage in Vehicles
Log All Item Usage
Track Food Consumption Statistics
Add Starter Items to New Player Inventories
Populate Dumpsters with Random Loot
Best Practices
Last updated