Inventory
Instruction and guide on how to setup your inventory for T1GER resources
Introduction
T1GER Resources supports compatibility with popular custom inventories. We plan on adding "out-the-box" compatibility with more inventories as they are being proposed to us.
You can also use the 'custom' option and integrate your own exports/function for whatever custom inventory you may have.
Config.Inventory
Specifies the custom inventory system in use. Update this based on your selected inventory system.
Type:
string
Options:
'ox-inventory'
- Ox Inventory'qb-inventory'
- QB Inventory'mf-inventory'
- ModFreakz Inventory (paid)'qs-inventory'
- Quasar Inventory (paid)'core-inventory'
- Core Inventory (paid)'custom'
- If none of these are being used or if you want to integrate your own!
Setup
All you need to do is basically set your inventory system in Config.Inventory
and you are all set.
If you are not using any of the preconfigured inventories, set the option to 'custom'
.
Please note that you have to integrate exports/functions yourself! It's not our job to support for 3rd party paid inventory.
We strongly recommend to reach out to your inventory creator to ask them to help you integrate their resource.
You can suggest compatibility on our discord and we might reach out to the creator of said inventory to possibly add preconfigured support.
Functions
These are the functions used in our T1GER resources.
These are also the functions you want to modify in case you want to integrate your custom inventory resource. Simply use 'custom'
in Config.Inventory
and integrate your export/functions in the if/else statements for 'custom'
.
OpenStash
Used when player in-game opens a shared/stash inventory. Usually in my resources, owner is nil.
CreateStash
Used when creating a stash first time (example when creating a storage marker). Not all inventories require this function to be ran.
RegisterStash
Used when restarting resource or starting up server. Some inventories requires stashes/storages to be registered/created manually.
StashAddItem
Used when need to add an item directly into a stash/storage. The stash/storage identifier string is also parsed as an argument in this function.
QB Inventory Not Opening
By default, t1ger_lib will support latest qb-inventory. If you may for whatever reason, still be using the old qb-inventory, then follow these instructions:
t1ger_lib/client/framework.lua
t1ger_lib/client/framework.lua
Find the function called OpenStash
and you should see the following code:
![](https://docs.t1ger.net/~gitbook/image?url=https%3A%2F%2F2167335559-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MiDWIMbFBeXle-trOlk%252Fuploads%252FRkVQ1xhmaqSorJ1d1Z3W%252Fimage.png%3Falt%3Dmedia%26token%3D25ed3601-fcc7-49d2-8e94-f458696d48a7&width=768&dpr=4&quality=100&sign=32bfe3d5&sv=1)
Now, all u need to do is simply commenting out the TriggerServerEvent and enabling the other code that has already been commented out.
You can also replace your whole OpenStash function with this snippet, where I have made the changes for you:
Last updated