In ox_inventory, item containers are used to store multiple items, such as loot crates, stash inventories, or player bags. By default, containers will start empty, requiring manual population. This snippet introduces functionality to prepopulate containers when they are created, allowing you to define preset inventories with specific items.
This is useful for scenarios such as:
- Lootable Crates – Ensure predefined loot spawns in chests or boxes.
- Starter Kits – Automatically provide a set of items inside of a box.
- Item Packages - Items that would come prepackaged in bulk like a pack of cigarettes that contains 10 cigarettes.
- Mission Rewards – Quest-related items directly into an item container.
This will be done in 3-4 simple steps, just follow along below and it should be a breeze!