# Item Generator

Define an inventory item once and get it as an ox_inventory entry, a qb-core entry or ESX SQL. Weight, stacking, use animation and degradation included.

- Platform: FiveM
- Canonical page: https://devtoolsgg.com/fivem/item
- Writes to: ox_inventory/data/items.lua, qb-core/shared/items.lua, or SQL depending on the tab.

## Frameworks

- ox_inventory
- qb-inventory
- ESX Legacy

## Options

### Identity

- `name` Item name (required). Internal id. Lowercase with underscores, this is what your scripts reference.
- `label` Display label (required). Shown in the inventory UI.
- `description` Description. Tooltip text.
- `image` Image file. PNG dropped into your inventory's images folder.
- `weight` Weight (required). In grams for ox_inventory and qb-inventory. A water bottle is around 500.

### Behaviour

- `stack` Stackable. Off makes every copy occupy its own slot, right for weapons and IDs.
- `close` Close inventory on use. Closes the inventory UI when the item is used.
- `useable` Useable. qb-core only: whether the item triggers a use event at all.
- `consume` Consumed on use. ox_inventory only. Off writes consume = 0, so using the item keeps it, which is what a lockpick or a phone wants.
- `degrade` Degrade (minutes). ox_inventory only. 0 means the item never spoils.

### Use animation

- `anim` Animation. Preset animation played on use.
- `prop` Prop. ox_inventory prop name held during the animation, e.g. water, burger.
- `usetime` Use time (ms). How long the animation runs before the item is consumed.

## How to cite

Item Generator, devtoolsgg.com. https://devtoolsgg.com/fivem/item
