forked from Simnation/Main
ed
This commit is contained in:
parent
e6877350c3
commit
2483c25703
2 changed files with 14 additions and 7 deletions
|
@ -405,7 +405,7 @@ Config.CustomGasPumpLocations = {
|
|||
{ prop = "prop_gas_pump_1b", location = vector4(-1125.15, -2866.97, 12.95, 240.0), ropeLength = 14.0 },
|
||||
{ prop = "prop_gas_pump_1b", location = vector4(1771.81, 3229.24, 41.51, 15.00), ropeLength = 14.0 },
|
||||
{ prop = "prop_gas_pump_1b", location = vector4(1748.31, 3297.08, 40.16, 15.0), ropeLength = 14.0 },
|
||||
{ prop = "prop_gas_pump_1b", location = vector4(-994.71, -3032.24, 12.95, 337.73), ropeLength = 14.0 },
|
||||
{ prop = "prop_gas_pump_1b", location = vector4(-994.71, -3032.24, 12.95, 337.73), ropeLength = 14.0 }, -- Flughafen
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -182,12 +182,19 @@ AddEventHandler("lc_fuel:confirmJerryCanPurchase",function(data)
|
|||
end
|
||||
Utils.Framework.tryRemoveAccountMoney(source, Config.JerryCan.price, Config.Accounts[data.paymentMethod])
|
||||
|
||||
-- Gives the jerry can to the player
|
||||
if Config.JerryCan.giveAsWeapon then
|
||||
Utils.Framework.givePlayerWeapon(source, Config.JerryCan.item, 1, Config.JerryCan.metadata)
|
||||
else
|
||||
Utils.Framework.givePlayerItem(source, Config.JerryCan.item, 1, Config.JerryCan.metadata)
|
||||
end
|
||||
-- Gives the jerry can to the player
|
||||
if Config.JerryCan.giveAsWeapon then
|
||||
local weaponMetadata = Config.JerryCan.metadata or {}
|
||||
weaponMetadata.serie = "JERRYCAN-" .. math.random(100000, 999999)
|
||||
Utils.Framework.givePlayerWeapon(source, Config.JerryCan.item, 1, weaponMetadata)
|
||||
else
|
||||
local itemMetadata = {}
|
||||
for k, v in pairs(Config.JerryCan.metadata or {}) do
|
||||
itemMetadata[k] = v
|
||||
end
|
||||
itemMetadata.serie = "JERRYCAN-" .. math.random(100000, 999999)
|
||||
Utils.Framework.givePlayerItem(source, Config.JerryCan.item, 1, itemMetadata)
|
||||
end
|
||||
|
||||
TriggerClientEvent("lc_fuel:Notify", source, "success", Utils.translate('jerry_can_paid'):format(Config.JerryCan.price))
|
||||
TriggerClientEvent("lc_fuel:closeUI", source, data.fuelAmount, data.selectedFuelType)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue