1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-19 00:54:05 +02:00
parent fd4a26921e
commit d3f2934dfc
2 changed files with 6 additions and 2 deletions

View file

@ -182,14 +182,18 @@ AddEventHandler("lc_fuel:confirmJerryCanPurchase",function(data)
end end
Utils.Framework.tryRemoveAccountMoney(source, Config.JerryCan.price, Config.Accounts[data.paymentMethod]) Utils.Framework.tryRemoveAccountMoney(source, Config.JerryCan.price, Config.Accounts[data.paymentMethod])
-- Gives the jerry can to the player -- Gives the jerry can to the player
local itemMetadata = {} local itemMetadata = {}
for k, v in pairs(Config.JerryCan.metadata or {}) do for k, v in pairs(Config.JerryCan.metadata or {}) do
itemMetadata[k] = v itemMetadata[k] = v
end end
-- Add required fields for tgiann-inventory weapon items
-- Add all required fields for tgiann-inventory weapon items
itemMetadata.serie = "JERRYCAN-" .. math.random(100000, 999999) itemMetadata.serie = "JERRYCAN-" .. math.random(100000, 999999)
itemMetadata.durabilityPercent = 100 -- Set to 100% durability for new jerry can itemMetadata.durabilityPercent = 100 -- Set to 100% durability for new jerry can
itemMetadata.usedTotalAmmo = 0 -- No ammo used yet
itemMetadata.ammo = itemMetadata.ammo or 20 -- Use existing ammo value or default to 20
if Config.JerryCan.giveAsWeapon then if Config.JerryCan.giveAsWeapon then
Utils.Framework.givePlayerWeapon(source, Config.JerryCan.item, 1, itemMetadata) Utils.Framework.givePlayerWeapon(source, Config.JerryCan.item, 1, itemMetadata)

View file

@ -315,7 +315,7 @@ config.slotsMaxWeights = {
maxWeight = 10000 maxWeight = 10000
}, },
glovebox = { -- These values will be active if maxweight and slots data is not sent in the glovebox event glovebox = { -- These values will be active if maxweight and slots data is not sent in the glovebox event
slots = 1, slots = 4,
maxWeight = 4000 maxWeight = 4000
} }
} }