qb-inventory
qb-inventory copied to clipboard
[BUG] stashes wont open
Summary
the stashes wont open for players. i have tried redownloading from code source and it does the same thing
Reproduction
- start server
- log in
- try to open stash
- stash doesnt open/ no ui
Expected behavior
the stash opens
Actual behavior
press e to open stash. it doesnt do anything
Additional context
No response
Last Updated
got from the code source today.
Custom Resources
qs housing, qs smartphone
Resource Rename
qb-inventory
You need to implement the new qb-inventory exports in qs-housing for it to work!
The code:
client/custom/inventory/default.lua or qs-inventory.lua -- depends on your config file
TriggerServerEvent('qs-housing:server:openNewqbInv', uniq) -- change it where there qb-inventory trigger
server/qb-inventoryfix.lua -- you need to create this file and add it to fxmanifest or just use an existing server side files
local QBCore = exports['qb-core']:GetCoreObject()
RegisterNetEvent('qs-housing:server:openNewqbInv', function(stashname) local src = source local Player = QBCore.Functions.GetPlayer(src) if not Player then return end exports['qb-inventory']:OpenInventory(src, stashname, { maxweight = Config.DefaultStashData.maxweight, slots = Config.DefaultStashData.slots, }) end)
Would this be the same route for qs-housing? i added it does the same as the OG qb script
Would this be the same route for qs-housing? i added it does the same as the OG qb script
The code i showed you is for the qs-housing i fixed mine with that code because the developer of the script is to lazy to add an option to config for new inventory and new qb-garages script.
Would this be the same route for qs-housing? i added it does the same as the OG qb script
The code i showed you is for the qs-housing i fixed mine with that code because the developer of the script is to lazy to add an option to config for new inventory and new qb-garages script.
would you be able to show me the grages fix? I am having a similar issue with the housing making garages that are accessible.
Im having the same issue but with just regular qb as a clean framework. The stashes wont open at all.
me too
same here
QB Apartment Stash Fix
Go to qb-apartments/server/main.lua, locate the event apartments:server:openStash, and replace it with the following code:
RegisterNetEvent('apartments:server:openStash', function(CurrentApartment)
local src = source
local other = { maxweight = 1000000, slots = 50 }
exports['qb-inventory']:OpenInventory("stash", CurrentApartment, other, src)
end)
This update ensures proper integration with the qb-inventory resource by passing the required parameters (name, id, other, origin) to the OpenInventory function. The other parameter is configured to set the maximum weight and slot capacity for the stash inventory.
This issue has had 60 days of inactivity & will close within 7 days