Stash

Welcome to Stash System

In this case, we will not have to make changes to our other resources in a mandatory way, by modifying our core we are able to make everything natively compatible, which means that we will use RegisterUsableItem, CanCarryItem, addInventoryItem, removeInventoryItem or other native ones of our core, so don't worry. make a headache.

1. Changes to stashes and storage

One of the few changes to make to other assets is the use of stashes since in our system we have our own event for opening it or even exports that will facilitate the process, for this we can use the original event of our system using:

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)

In case of wanting a more familiar and free export, we can use this export in our resources, both on the client side and on the server side. Note that this requires testing and some Lua skills.

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

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.

Last updated