Qb-expandableVehicleTrunk
- Custom server-side vehicle inventory weight
- add lock screen
- mini-game
- install swkeep-tablet
- and then import expandableVehicleTrunk.sql into your SQL
- inside "qb-inventory/client/main.lua".
- try to find this code "if CurrentVehicle then -- Trunk".
- and then you should be abale to see this line >> "local vehicleClass = GetVehicleClass(curVeh)"
- then add code below
local plate = QBCore.Functions.GetPlate(curVeh)
- now try to find this code
local other = {
maxweight = maxweight,
slots = slots,
}
- and then add "plate = plate" to table
local other = {
maxweight = maxweight,
slots = slots,
plate = plate
}
- inside "qb-inventory/server/main.lua".
- try to find this functions >> "inventory:server:OpenInventory".
if Trunks[id].isOpen then
local Target = QBCore.Functions.GetPlayer(Trunks[id].isOpen)
if Target ~= nil then
TriggerClientEvent('inventory:client:CheckOpenState', Trunks[id].isOpen, name, id, Trunks[id].label)
else
Trunks[id].isOpen = false
end
end
end
( ADD CODE HERE )
secondInv.name = "trunk-"..id
secondInv.label = "Trunk-"..id
replace ( ADD CODE HERE ) with code below
local result = exports.oxmysql:scalarSync('SELECT `actualCarryCapacity` FROM player_vehicles WHERE plate = ?',
{other.plate})
if result then
other.maxweight = json.decode(result)
end