add some inventory examples

This commit is contained in:
Linden committed 2022-05-15 22:27:07 +10:00
1 parent 7380341246
commit c1d420aeaa
5 files changed
+44 -15

No files matched your search

@@ -1,14 +1,21 @@
Creates an inventory drop at the specified coords.
Drops can be created from other resources, containing a variety of items and utilising a custom label (instead of 'Drop 32648').
```lua
-- prefix: string
-- items: table
-- name: string
-- count: number
-- metadata: table (optional)
-- coords: vector3
-- slots: number
-- maxWeight: number
-- instance: ? (optional)
exports.ox_inventory:CustomDrop(prefix, item, coords, slots, maxWeight, instance)
-- slots: number (optional)
-- maxWeight: number (optional)
-- instance: string | number (optional)
exports.ox_inventory:CustomDrop(prefix, items, coords, slots, maxWeight, instance)
```
**Example:**
You can find and example showcasing this function into furher detail [here](../../../Guides/customDrop.md).
```lua
exports.ox_inventory:CustomDrop('Carcass', {
{'meat', 5, { grade = 2, type = 'deer' }},
{'hide', 5, { grade = 2, type = 'deer' }}
}, coords)
```