For the complete documentation index, see llms.txt. This page is also available as Markdown.

Adaptations

Stash Adaptation

For inventory adaptation, you need to find the document of the inventory you are using and adapt it to this section.

Template.OpenStash = function(id, haveBigStash)
    local weight = haveBigStash and Config.LargeStashSize or Config.StandardStashSize
    local slots = haveBigStash and Config.largeStashSlots or Config.stashSlots

    if GetResourceMetadata("qb-inventory", "version", 0) ~= "2.0.0" then
        TriggerEvent("qb-inventory:client:openInventory", id, {
            maxweight = weight,
            slots = slots,
        })
        TriggerEvent("qb-inventory:client:setCurrentStash", id)
    else
        TriggerServerEvent("s4-illegalcaravan:qbStash", id, weight, slots)
    end
end

Sample adaptation for qs-inventory

Template.OpenStash = function(id, haveBigStash)
    local weight = haveBigStash and Config.LargeStashSize or Config.StandardStashSize
    local slots = haveBigStash and Config.largeStashSlots or Config.stashSlots

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

Last updated