Skip to content

Commit c14b7da

Browse files
authored
2.1.2 | Major Fixes, Add New Config Option
https://github.com/CodineDev/cdn-fuel#lastest-patch-information
2 parents 7a95a56 + 2fa2c5f commit c14b7da

14 files changed

Lines changed: 731 additions & 338 deletions

File tree

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
![Codine Development Fuel Script Banner](https://i.imgur.com/qVOMMvW.png)
22

3-
# _CDN-Fuel (2.1.1)_
3+
# _CDN-Fuel (2.1.2)_
44

55
A highly in-depth fuel system for **FiveM** with support for the **QBCore Framework & QBox Remastered**.
66

77
# _Lastest Patch Information_
88
*Additions:*
9-
- Emergency Services Discounts (Config Enabled)
10-
- Air & Water Vehicle Fueling (Config Enabled)
11-
- Hose Attached To Nozzle (Config Enabled)
12-
- OX Library Support (Menu/Input/Inventory/Target) Additions.
13-
- QBox Framework now supported.
14-
- Electric Vehicles turn off when at 0 fuel. (Config Enabled)
9+
- Various Optimizations Throughout
10+
- Config Option for Having Owners Pickup Reserves they Purchase
1511

1612
*Fixes:*
17-
- Bank Payment Double Taxing Payments.
18-
- Paleto Locations PolyZone issue.
19-
- Fix Electric Vehicles Not Stopping On 0 Fuel
20-
- Fix Emergency Services Discounts
21-
- Fix Polyzone for MRPD Helicopter Refuel
13+
- Blip Color on Normal Blip not working.
14+
- [Jerry Can Flipped Orientation](https://github.com/dnelyk/cdn-grub-updates/assets/95599217/0489397e-99c9-43d9-8aab-0d4a45463cfd)
15+
- Various Syphoning Issues (Item Data / Input / Menu etc)
16+
- Various Jerry Can Issues (Similar to Syphon Issues)
17+
- Station Owners Not Recieving Full Price on Discounted Purchases
18+
19+
*Removals:*
20+
- NPWD "Support" as there are various large issues.
2221

2322
<br>
2423
<br>

client/electric_cl.lua

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ if Config.ElectricVehicleCharging then
8181
local money = nil
8282
if purchasetype == "bank" then money = QBCore.Functions.GetPlayerData().money['bank'] elseif purchasetype == 'cash' then money = QBCore.Functions.GetPlayerData().money['cash'] end
8383
FuelPrice = (1 * Config.ElectricChargingPrice)
84-
local vehicle = QBCore.Functions.GetClosestVehicle()
84+
local vehicle = GetClosestVehicle()
8585

8686
-- Police Discount Math --
8787
if Config.EmergencyServicesDiscount['enabled'] == true and (Config.EmergencyServicesDiscount['emergency_vehicles_only'] == false or (Config.EmergencyServicesDiscount['emergency_vehicles_only'] == true and GetVehicleClass(vehicle) == 18)) then
@@ -205,7 +205,7 @@ if Config.ElectricVehicleCharging then
205205
end)
206206

207207
RegisterNetEvent('cdn-fuel:client:electric:SendMenuToServer', function()
208-
local vehicle = QBCore.Functions.GetClosestVehicle()
208+
local vehicle = GetClosestVehicle()
209209
local vehiclename = GetEntityModel(vehicle)
210210
AwaitingElectricCheck = true
211211
FoundElectricVehicle = false
@@ -340,7 +340,7 @@ if Config.ElectricVehicleCharging then
340340
if amount < 1 then return end
341341
if amount < 10 then fuelamount = string.sub(amount, 1, 1) else fuelamount = string.sub(amount, 1, 2) end
342342
local FuelPrice = (Config.ElectricChargingPrice * 1)
343-
local vehicle = QBCore.Functions.GetClosestVehicle()
343+
local vehicle = GetClosestVehicle()
344344

345345
-- Police Discount Math --
346346
if Config.EmergencyServicesDiscount['enabled'] == true and (Config.EmergencyServicesDiscount['emergency_vehicles_only'] == false or (Config.EmergencyServicesDiscount['emergency_vehicles_only'] == true and GetVehicleClass(vehicle) == 18)) then
@@ -394,7 +394,7 @@ if Config.ElectricVehicleCharging then
394394
end
395395

396396
local refillCost = (fuelamount * FuelPrice) + GlobalTax(fuelamount*FuelPrice)
397-
local vehicle = QBCore.Functions.GetClosestVehicle()
397+
local vehicle = GetClosestVehicle()
398398
local ped = PlayerPedId()
399399
local time = amount * Config.RefuelTime
400400
if amount < 10 then time = 10 * Config.RefuelTime end
@@ -461,17 +461,6 @@ if Config.ElectricVehicleCharging then
461461
if purchasetype == "cash" then
462462
TriggerServerEvent('cdn-fuel:server:PayForFuel', refillCost, purchasetype, FuelPrice, true)
463463
elseif purchasetype == "bank" then
464-
if Config.NPWD then
465-
exports["npwd"]:createNotification({ -- You can change this export to your own notification
466-
notisId = "npwd:electricityPaidFor",
467-
appId = "BANK",
468-
content = "You have paid $"..refillCost.." for electric at $"..FuelPrice.." per KWh + tax",
469-
secondaryTitle = "New Transaction",
470-
keepOpen = false,
471-
duration = 15000,
472-
path = "/BANK",
473-
})
474-
end
475464
TriggerServerEvent('cdn-fuel:server:PayForFuel', refillCost, purchasetype, FuelPrice, true)
476465
end
477466
local curfuel = GetFuel(vehicle)

0 commit comments

Comments
 (0)