qb-inventory icon indicating copy to clipboard operation
qb-inventory copied to clipboard

[BUG] stashes wont open

Open CottonMouthMax opened this issue 1 year ago • 3 comments

Summary

the stashes wont open for players. i have tried redownloading from code source and it does the same thing

Reproduction

  1. start server
  2. log in
  3. try to open stash
  4. 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

CottonMouthMax avatar Sep 23 '24 17:09 CottonMouthMax

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)

CxCore-xyz avatar Sep 24 '24 20:09 CxCore-xyz

Would this be the same route for qs-housing? i added it does the same as the OG qb script

CottonMouthMax avatar Sep 24 '24 21:09 CottonMouthMax

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.

CxCore-xyz avatar Sep 25 '24 12:09 CxCore-xyz

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.

SylvaDev avatar Oct 08 '24 10:10 SylvaDev

Im having the same issue but with just regular qb as a clean framework. The stashes wont open at all.

Mitch-Altman avatar Nov 11 '24 10:11 Mitch-Altman

me too

Yeti1123 avatar Dec 20 '24 10:12 Yeti1123

same here

ReazCho avatar Jan 14 '25 08:01 ReazCho

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.

minuka05 avatar Jan 24 '25 10:01 minuka05

This issue has had 60 days of inactivity & will close within 7 days

github-actions[bot] avatar Mar 25 '25 15:03 github-actions[bot]