diff --git a/client/electric_cl.lua b/client/electric_cl.lua index e0b9607..4a08212 100644 --- a/client/electric_cl.lua +++ b/client/electric_cl.lua @@ -679,9 +679,6 @@ if Config.ElectricVehicleCharging then RequestModel('electric_charger') while not HasModelLoaded('electric_charger') do Wait(50) - if Config.FuelDebug then - print("Loading Electric Charger Model.") - end end Config.GasStations[i].electriccharger = CreateObject('electric_charger', Config.GasStations[i].electricchargercoords.x, Config.GasStations[i].electricchargercoords.y, Config.GasStations[i].electricchargercoords.z, false, true, true) if Config.FuelDebug then print("Created Electric Charger @ Location #"..i) end diff --git a/client/fuel_cl.lua b/client/fuel_cl.lua index 48a7d15..8c4e4c2 100644 --- a/client/fuel_cl.lua +++ b/client/fuel_cl.lua @@ -1638,7 +1638,7 @@ RegisterNetEvent('cdn-fuel:jerrycan:refueljerrycan', function(data) QBCore.Functions.Notify(Lang:t("jerry_can_success"), 'success') local srcPlayerData = QBCore.Functions.GetPlayerData() if Config.Ox.Inventory then - TriggerServerEvent('cdn-fuel:info', "add", tonumber(refuelAmount), srcPlayerData, 'jerrycan') + TriggerServerEvent('cdn-fuel:info', "add", tonumber(refuelAmount), srcPlayerData, itemData) else TriggerServerEvent('cdn-fuel:info', "add", tonumber(refuelAmount), srcPlayerData, itemData) end @@ -1704,7 +1704,7 @@ RegisterNetEvent('cdn-fuel:jerrycan:refueljerrycan', function(data) local srcPlayerData = QBCore.Functions.GetPlayerData() local refuelAmount = tonumber(refuel.amount) if Config.Ox.Inventory then - TriggerServerEvent('cdn-fuel:info', "add", tonumber(refuelAmount), srcPlayerData, 'jerrycan') + TriggerServerEvent('cdn-fuel:info', "add", tonumber(refuelAmount), srcPlayerData, jerryCanData) else TriggerServerEvent('cdn-fuel:info', "add", tonumber(refuelAmount), srcPlayerData, jerryCanData) end @@ -1783,6 +1783,7 @@ RegisterNetEvent('cdn-syphoning:syphon:menu', function(itemData) if tonumber(itemData.metadata.cdn_fuel) < 1 then nogas = true Nogasstring = Lang:t("menu_syphon_empty") else nogas = false Nogasstring = Lang:t("menu_syphon_refuel") end if tonumber(itemData.metadata.cdn_fuel) == Config.SyphonKitCap then syphonfull = true Stealfuelstring = Lang:t("menu_syphon_kit_full") elseif GetFuel(vehicle) < 1 then syphonfull = true Stealfuelstring = Lang:t("menu_syphon_vehicle_empty") else syphonfull = false Stealfuelstring = Lang:t("menu_syphon_allowed") end -- Disable Options based on item data else + if not itemData.info.gasamount then nogas = true Nogasstring = Lang:t("menu_syphon_empty") end if itemData.info.gasamount < 1 then nogas = true Nogasstring = Lang:t("menu_syphon_empty") else nogas = false Nogasstring = Lang:t("menu_syphon_refuel") end if itemData.info.gasamount == Config.SyphonKitCap then syphonfull = true Stealfuelstring = Lang:t("menu_syphon_kit_full") elseif GetFuel(vehicle) < 1 then syphonfull = true Stealfuelstring = Lang:t("menu_syphon_vehicle_empty") else syphonfull = false Stealfuelstring = Lang:t("menu_syphon_allowed") end -- Disable Options based on item data end @@ -1896,7 +1897,7 @@ RegisterNetEvent('cdn-syphoning:syphon', function(data) currentsyphonamount = tonumber(data.itemData.metadata.cdn_fuel) HasSyphon = exports.ox_inventory:Search('count', 'syphoningkit') else - currentsyphonamount = data.itemData.info.gasamount + currentsyphonamount = data.itemData.info.gasamount or 0 HasSyphon = QBCore.Functions.HasItem("syphoningkit", 1) end diff --git a/fxmanifest.lua b/fxmanifest.lua index c72de11..b3b4e3d 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'cerulean' game 'gta5' author 'https://www.github.com/CodineDev' -- Base Refueling System: (https://github.com/InZidiuZ/LegacyFuel), other code by Codine (https://www.github.com/CodineDev). description 'cdn-fuel' -version '2.1.4' +version '2.1.6' client_scripts { '@PolyZone/client.lua', diff --git a/version b/version index c5864dc..b6da512 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.1.5 \ No newline at end of file +2.1.6 \ No newline at end of file