Skip to content

Commit

Permalink
(1.0.4) Small Bug Fixes
Browse files Browse the repository at this point in the history
Fixed: CodineDev#6
Fixed another issue regarding paying with phone, charging if you fill your entire tank!
  • Loading branch information
dnelyk authored Sep 29, 2022
1 parent 7b48bc5 commit 1530cd1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ local function GlobalTax(value)
end

local function SetBusy(state)
if state then
LocalPlayer.state:set("inv_busy", true, true) -- Busy
elseif not state then
LocalPlayer.state:set("inv_busy", false, false) -- Not Busy
if Config.FuelDebug then print("Attempting to Set Busy State for Inventory!") end
if Config.FuelDebug and not Config.InventoryBusy then print("Attempting to Set Busy State for Inventory, but, Config.InventoryBusy is Disabled, meaning busy state will not change!") end
if Config.InventoryBusy then
if state then
LocalPlayer.state:set("inv_busy", true, true) -- Busy
elseif not state then
LocalPlayer.state:set("inv_busy", false, false) -- Not Busy
end
end
end

Expand Down Expand Up @@ -204,7 +208,7 @@ RegisterNetEvent('cdn-fuel:client:grabnozzle', function()
QBCore.Functions.Notify("The nozzle can't reach this far!", 'error')
if Config.FuelNozzleExplosion then
AddExplosion(grabbednozzlecoords.x, grabbednozzlecoords.y, grabbednozzlecoords.z, 'EXP_TAG_PROPANE', 1.0, true,false, 5.0)
StartScriptFire(grabbednozzlecoords.x, grabbednozzlecoords.y, grabbednozzlecoords.z - 1,25,false)
StartScriptFire(grabbednozzlecoords.x, grabbednozzlecoords.y, grabbednozzlecoords.z - 1, 25, false)
SetFireSpreadRate(10.0)
Wait(5000)
StopFireInRange(grabbednozzlecoords.x, grabbednozzlecoords.y, grabbednozzlecoords.z - 1, 3.0)
Expand Down Expand Up @@ -413,7 +417,7 @@ RegisterNetEvent('cdn-fuel:client:RefuelVehicle', function(data)
function()
SetBusy(false)
refueling = false
TriggerServerEvent('cdn-fuel:server:PayForFuel', refillCost, purchasetype)
if not Config.RenewedPhonePayment then TriggerServerEvent('cdn-fuel:server:PayForFuel', refillCost, purchasetype) end
local curfuel = GetFuel(vehicle)
local finalfuel = (curfuel + fuelamount)
if finalfuel > 99 and finalfuel < 100 then
Expand Down

0 comments on commit 1530cd1

Please sign in to comment.