Go to your lj/qb-inventory > html > js > app.js (EARLIER VERSION BELOW THIS BLOCK)
Search for the following code block:
lj/qb-inventory > html > js > app.js
case "harness":
Add the following code block directly underneath the code block in Step 1:
lj/qb-inventory > html > js > app.js
case "joint":
case "weedbaggie":
case "femaleseed":
return `<p><strong>Strain: </strong>${itemData.info.strain}.</p>`
case "weedpackage":
case "driedbud":
return `<p><strong>Strain: </strong>${itemData.info.strain}</span></p><p><strong>Remaining Weights: </strong><span>${itemData.info.remainweight} grams.</p>`
case "wetbud":
return `<p><strong>Strain: </strong><span>${itemData.info.strain}</span></p><p><strong>Dry: </strong><span>${itemData.info.dry}%.</p>`
case "wateringcan":
return `<p><strong>Water: </strong>${itemData.info.water}%.</p>`
OR IF YOU HAVE THE EARLIER VERSION OF Ps/Lj/Qb-inventory, follow this instead for this specific step
Go to your lj/qb-inventory > html > js > app.js
Search for the following code block:
lj/qb-inventory > html > js > app.js
} else if (itemData.name == "harness") {
Add the following code block directly underneath the code block in Step 1:
RegisterNetEvent('rep-weed:server:saveDry',function (type,id)
if type == "trunk" then
if IsVehicleOwned(id) then
if Trunks[id.label] == "Trunk-None" or not Trunks[id].items then return end
for _, item in pairs(Trunks[id].items) do
item.description = nil
end
MySQL.insert('INSERT INTO trunkitems (plate, items) VALUES (:plate, :items) ON DUPLICATE KEY UPDATE items = :items', {
['plate'] = id,
['items'] = json.encode(Trunks[id].items)
})
end
elseif type == "glovebox" then
if (IsVehicleOwned(id)) then
if Gloveboxes[id].label == "Glovebox-None" or not Gloveboxes[id].items then return end
for _, item in pairs(Gloveboxes[id].items) do
item.description = nil
end
MySQL.insert('INSERT INTO gloveboxitems (plate, items) VALUES (:plate, :items) ON DUPLICATE KEY UPDATE items = :items', {
['plate'] = id,
['items'] = json.encode(Gloveboxes[id].items)
})
end
elseif type == "stash" then
if Stashes[id].label == "Stash-None" or not Stashes[id].items then return end
for _, item in pairs(Stashes[id].items) do
item.description = nil
end
MySQL.insert('INSERT INTO stashitems (stash, items) VALUES (:stash, :items) ON DUPLICATE KEY UPDATE items = :items', {
['stash'] = id,
['items'] = json.encode(Stashes[id].items)
})
end
end)
RegisterNetEvent('rep-weed:server:updateDry',function (type,id, slot, item)
if type == 'stash' then
Stashes[id].items[slot] = item
elseif type == 'trunk' then
Trunks[id].items[slot] = item
elseif type == "glovebox" then
Gloveboxes[id].items[slot] = item
end
end)
local function AddToStash(stashId, slot, otherslot, itemName, amount, info, created)
Right before:
local ItemData = QBCore.Shared.Items[itemName]
Add:
if itemName == "wetbud" then
if not info then
info = {}
info.time = os.time()
info.dry = 0
else
if not info.time then info.time = os.time() end
if not info.dry then info.dry = 0 end
end
end
(OPTIONAL) If you want weed to also dry in trunk, player or glove trunk, repeat the same process