Skip to content

Commit 91c2858

Browse files
authored
Merge pull request #275 from Maximus7474/tweak/inventory-stash-details
Tweak: inventory registerstash details
2 parents d6a4005 + a1be023 commit 91c2858

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

pages/ox_inventory/Functions/Server.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,19 +719,25 @@ exports.ox_inventory:RegisterStash(id, label, slots, maxWeight, owner, groups, c
719719
- slots: `number`
720720
- maxWeight: `number`
721721
- owner: `string` or `boolean` or `nil`
722-
- `string`: Can only access the stash linked to the owner.
723-
- `true`: Each player has a unique stash but can request other player's stashes.
722+
- `string`: Links the stash to an specific identifier in the database, used for lookups and deletion.
723+
- `true`: Each player has a unique stash but can request other player's stashes (i.e. personal lockers).
724724
- `nil`: Always shared.
725725
- groups: `table`
726726
- Table of player groups (jobs) able to access the stash.
727727
- Table of group names where the numeric value is the minimum grade required.
728728
- `{['police'] = 0, ['ambulance'] = 2}`
729729
- coords?: `vector3` or `vector3[]`
730+
- instance?: `number` | `string`
731+
- Restrict access to the stash based on the player's instance.
730732

731733
<Callout>
732734
This function needs to be triggered before a player can open the stash.
733735
</Callout>
734736

737+
<Callout type="error">
738+
The owner parameter is not for access control of the stash, use the [`openInventory`](./Server/Hooks.mdx#openinventory) hook for access control.
739+
</Callout>
740+
735741
<br />
736742
<u>**Example**</u><br />
737743
For a use case example on this function check out the written [Guide](../Guides/stashes) for it.

0 commit comments

Comments
 (0)