Stashes System

The stashes in Quasar Inventory are really useful, smart and simple to integrate into other scripts. This system is completely standalone for both esx and qbcore, follow the following steps to integrate it into your other assets.

This integration requires basic programming knowledge and we ask that you at least have basic knowledge or a programmer to help you in this case.

I can't integrate it myself

In this case, after having read the documentation completely, if you cannot integrate a stash yourself, make use of the tickets in our community in case of free assets.

If your asset is from a third party, please contact the creator directly to resolve this issue.

Basic integrations

To integrate a stash, either through export or event, we must have an identification to give to said store, in the case of the examples mentioned it will be lockerID, do not forget to give it the specific value of this identification or use your own identifier for a private stash.

If you want to make a completely personal stash, you can use your player's id as the stash id using client-side ESX.GetPlayerData().identifier.

To integrate stashes we have two methods, the basic event without the use of export which is the simplest to apply or the more complex export which can be used both on the client and on the server.

Don't forget to give the values corresponding to the lockerID example, in that case we must modify it for the identification that we will decide to give to the stash or simply delete it and give it a name.

local other = {}
other.maxweight = 10000 -- Custom weight statsh
other.slots = 50 -- Custom slots spaces
TriggerServerEvent("inventory:server:OpenInventory", "stash", "Stash_"..lockerID, other)
TriggerEvent("inventory:client:SetCurrentStash", "Stash_"..lockerID)

Advanced exports

In the case of wanting to integrate it on the client or server side through a faster export, we can execute either of these two events, depending on your situation.

exports['qs-inventory']:RegisterStash("Stash_"..lockerID, 50, 10000) 

Simple use within qs-shops

There is still another simpler option, you can run customizable stashes from your qs-shops, where you can add dependencies on licenses or items, such as jobs and degrees. This system is much simpler and you can find it in qs-shops/config/config.lua.

You can use the esx licenses using Config.ESXLicense, since by default the license will be a required item, if you enable this option it will use the esx_licenses licenses.

Last updated