mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
Update CustomDrop.md
This commit is contained in:
1 parent
8f5d219243
commit
820fe25f7a
1 file changed
+18
-10
@@ -1,22 +1,30 @@
|
|||||||
Drops can be created from other resources, containing a variety of items and utilising a custom label (instead of 'Drop 32648').
|
Drops can be created from other resources, containing a variety of items and utilising a custom label (instead of 'Drop 32648').
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
exports.ox_inventory:CustomDrop(prefix, items, coords, slots, maxWeight, instance)
|
exports.ox_inventory:CustomDrop(prefix, items, coords, slots, maxWeight, instance, model)
|
||||||
```
|
```
|
||||||
|
|
||||||
* prefix: `string`
|
- prefix: `string`
|
||||||
* items: `table`
|
- items: `table`
|
||||||
* name: `string`
|
- name: `string`
|
||||||
* count: `number`
|
- count: `number`
|
||||||
* metadata?: `table`
|
- metadata?: `table`
|
||||||
* coords: `vector3`
|
- coords: `vector3`
|
||||||
* slots?: `number`
|
- slots?: `number`
|
||||||
* maxWeight?: `number`
|
- maxWeight?: `number`
|
||||||
* instance?: `string` or `number`
|
- instance?: `string` or `number`
|
||||||
|
- model?: `number`
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
-- Create a generic drop with a marker
|
||||||
exports.ox_inventory:CustomDrop('Carcass', {
|
exports.ox_inventory:CustomDrop('Carcass', {
|
||||||
{'meat', 5, { grade = 2, type = 'deer' }},
|
{'meat', 5, { grade = 2, type = 'deer' }},
|
||||||
{'hide', 5, { grade = 2, type = 'deer' }}
|
{'hide', 5, { grade = 2, type = 'deer' }}
|
||||||
}, coords)
|
}, coords)
|
||||||
|
|
||||||
|
-- Create a drop with an entity
|
||||||
|
exports.ox_inventory:CustomDrop('SMG', {
|
||||||
|
{ 'WEAPON_MINISMG', 1 },
|
||||||
|
{ 'ammo-9', 69 },
|
||||||
|
}, GetEntityCoords(GetPlayerPed(1)), 5, 10000, nil, `w_sb_minismg`)
|
||||||
```
|
```
|
||||||
Reference in new issue
Block a user