If you are using one of the inventories we specified in the script, you can adjust your inventory here.
Config.CustomStash = function(HouseCode, StashNo)
print(HouseCode) -- Unique House Code (like ID)
print(StashNo) -- House Stash ID
end
Adding New House Shells
QB Garage Configure
In qb-garages script, if you are using Config.SharedGarages = true as true, you need to make this change in qb-garages/server/main.lua file.
Old Code
QBCore.Functions.CreateCallback('qb-garages:server:GetGarageVehicles', function(source, cb, garage, type, category)
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return end
local citizenId = Player.PlayerData.citizenid
local vehicles
if type == 'depot' then
vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND depotprice > 0', { citizenId })
elseif Config.SharedGarages then
vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ?', { citizenId })
else
vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND garage = ?', { citizenId, garage })
end
if #vehicles == 0 then
cb(nil)
return
end
if Config.ClassSystem then
local filteredVehicles = filterVehiclesByCategory(vehicles, category)
cb(filteredVehicles)
else
cb(vehicles)
end
end)
New Code
QBCore.Functions.CreateCallback('qb-garages:server:GetGarageVehicles', function(source, cb, garage, type, category)
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return end
local citizenId = Player.PlayerData.citizenid
local vehicles
if type == 'depot' then
vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND depotprice > 0', { citizenId })
elseif Config.SharedGarages then
vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ?', { citizenId })
else
vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND garage = ?', { citizenId, garage })
end
for _,data in pairs(vehicles) do
check = exports["0r_houses"]:IsVehicleInHouseGarage(data.plate)
if check then
table.remove(vehicles, _)
end
end
if #vehicles == 0 then
cb(nil)
return
end
if Config.ClassSystem then
local filteredVehicles = filterVehiclesByCategory(vehicles, category)
cb(filteredVehicles)
else
cb(vehicles)
end
end)
Custom Wardrobe
If you use a different clothing system, you can integrate the wardrobe here.
Config.CustomWardrobe = function()
-- Client or Server Event
end
Vehicle Spawned Event
If you use the vehicle key script when the player leaves or enters the garage, you can integrate it here. The example below is for qb-vehiclekeys.