forked from Simnation/Main
Update server.lua
This commit is contained in:
parent
98793f53cb
commit
fd4a26921e
1 changed files with 3 additions and 2 deletions
|
@ -182,13 +182,14 @@ 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 serie field for tgiann-inventory
|
-- Add 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
|
||||||
|
|
||||||
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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue