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)'codem-inventory'
- CodeM 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:
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