items.
Auto hook
File:modules/auto-detect/ox_inventory/swap-item-hooks.lua
When ox_inventory is running, core hooks swapItems and logs movement events automatically.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Tracking item movements, pickups, drops, and trades.
items.
modules/auto-detect/ox_inventory/swap-item-hooks.lua
When ox_inventory is running, core hooks swapItems and logs movement events automatically.
| Field | Type | Description |
|---|---|---|
event_type | string | "pickup", "drop", "give", "stash_put", "stash_take", "swap", "move". |
item | string | The technical name of the item. |
amount | number | The quantity of the item. |
slot | number | Source slot index. |
slot_to | number | Destination slot index. |
fromInventory | string | Identifier of the source inventory. |
toInventory | string | Identifier of the destination inventory. |
exports['fivemora-core']:AddWebsiteLog('items', 'info', 'Item moved: water', {
event_type = 'give',
item = 'water',
amount = 2,
fromInventory = 1,
toInventory = 2
}, source)