Fuel
POPULAR LINKS
- BUY IT! Purchase Fuel from BigDaddyScripts.com
- SERVER.LUA How to use the included server.lua with BigDaddy Scripts to set up framework integration for money functions
{:links-list}
INSTALLATION
- Open the downloaded ZIP product file and drop the folder in it somewhere in your resources folder.
- Add your product key (get it here) to the
settings.inifile - Add
start BigDaddy-Fuelto yourserver.cfg.
DO NOT RENAME THE FOLDER.
If you change the name of the folder it will not function correctly so leave the name as it is.
{:is-danger}
CONFIGURATION
WORKS WITH QBCore AND QBox
This will work with the QB frameworks. You MUST remove any other fuel scripts, i.e. qbx-fuel etc. because they will conflict and none of them will work right if they are fighting over who has control
{:is-danger}
gasstations.json
The file DOES NOT tell the script where to find pumps. It is literally only for adding blips to the map. Just put gas station locations in there and gas pump blips will render on the map where you put them. The pump functions are based on the pump models, which can be added to in the settings.ini
evchargers.json
Different from the gas station locations file, this file DOES tell the script where to render ev chargers and blips. It will only render blips more than 75m apart so it doesn't clutter the map with a ton of charger blips. But it will render chargers in all locations within this file.
settings.ini
| SETTING | DEFAULT | DESCRIPTION |
|---|---|---|
| [licensing] | ||
| key1 | none | This is where you put your product key |
| [settings] | ||
| ropeLength | 3.0 | Starting length of the hose, will show slack up to this length. |
| ropeMaxLength | 15.0 | The maximum length for breakage is 249 - anything over that will not explode |
| refuelmultiplier | 1.0 | Speed up or slow down the refueling process by changing this. > 1 is faster, < 1 is slower |
| rechargemultiplier | .5 | Speed up or slow down the recharging process by changing this. > 1 is faster, < 1 is slower |
| pumpsExplode | true | Set whether the pumps will explode when the hose is beyond Max Length |
| pricePerUnit | 3.54 | Price per Gal/L of fuel pumped |
| jerryCanPrice | 25.0 | Price for purchasing a gas can |
| gasunit | gallons | Can be set to gallons or liters |
| moneySymbol | $ | money symbol to use for display purposes |
| useNui | true | if you want the graphical display while filling, set to true, if just text only set to false |
| useMoney | true | if you set this to true, be sure to check server.lua to set up your money framework there |
| fueltrucks | fueltruck | Comma separated list of vehicle models that can be used as a fuel truck |
| chargetrucks | chargertruck | Comma separated list of vehicle models that can be used as a charge truck |
| showEVChargerBlips | true | Show blips on the map where EV chargers exist |
| showGasStationBlips | true | Show blips on the map where Fuel Stations exist |
| chanceOfSpillover | 5 | 0-100 percentage of time when full that gas will spill over onto the ground. Set to 0 to disable |
| ForceElectric | iak_wheelchair | A comma separated list of vehicles to force to electric (no spaces) |
| ForceGas | veto,veto2 | A comma separated list of vehicles to force to gas/petrol (no spaces) |
| allowPushing | true | allow vehicles to be pushed |
| showGauge | true | whether to show the built-in gas gauge or not |
| gaugeOffsetLeft | 140px | how far from the left of the screen to place the gauge. px or % |
| gaugeOffsetBottom | 75px | how far from the bottom of the screen to place the gauge. px or % |
| gaugeScale | .5 | scale multiplier for the pump and charger screens |
| additionalPumpModels | a comma separated list of prop spawn names of custom gas pumps | |
| additionalChargerModels | Evcharger1 | a comma separated list of prop spawn names of custom chargers |
| HidePrompts | false | whether to hide the text prompts at the pumps and gas caps |
| HideColorHints | true | whether to hide the color prompts at the pumps and gas caps |
| UseTargeting | true | enable targeting interaction mode |
| disableSetFuel | false | disable the /setfuel command |
| overrideLowFuelSputtering | true | override low fuel sputtering behavior |
| disableVehicleWhenEmpty | true | disable vehicle when tank is empty |
| debug | false | enable debug output |
| DesyncKey | 876619881203 | do not change this VERY IMPORTANT |
| [keys] | you can either use the name of the key found in ValidKeys.txt or the control ID found at https://docs.fivem.net/docs/game-references/controls/ | |
| GrabPlaceNozzle | 38 | |
| JerryCanInteraction | 47 | |
| PushAltKey | 36 | |
| PushKey | 38 | |
| [locales] | Change your language (special characters like accents may break the script) | |
| RemoveNozzle | Remove Nozzle | |
| DropNozzle | to Drop Nozzle | |
| InsertNozzle | Insert Nozzle | |
| ReplaceNozzle | Replace Nozzle | |
| GrabNozzle | Grab Nozzle | |
| UseJerryCan | Use Gas Can | |
| JerryCanEmpty | Gas Can is Empty | |
| RefilWithJerryCan | Fill with Gas Can | |
| StopRefillingWithJerryCan | Stop Filling | |
| VehicleTankFull | Tank is Full | |
| VehicleChargeFull | Fully Charged | |
| NoFuelInElectric | You cannot put fuel in an electric vehicle | |
| NoChargeInFuel | You cannot charge a gas powered vehicle | |
| Charging | Charging | |
| Fueling | Fueling | |
| ThisSale | This Sale | |
| NoMoney | You do not have enough money in the bank | |
| NoPower | The power is out. The pump/charger will not work. | |
| [rpmburnrates] | higher rpm (column 1) burns more fuel (column 2) | |
| 1.0 | 0.8 | |
| 0.9 | 0.7 | |
| 0.8 | 0.6 | |
| 0.7 | 0.5 | |
| 0.6 | 0.4 | |
| 0.5 | 0.3 | |
| 0.4 | 0.3 | |
| 0.3 | 0.2 | |
| 0.2 | 0.2 | |
| 0.1 | 0.1 | |
| 0.0 | 0.1 | |
| [vehicleburnrates] | adjust burn rates by vehicle class... anything less than 1.0 burns slower, more than 1.0 burns faster | |
| 0 | 0.5 | Compacts |
| 1 | 0.7 | Sedans |
| 2 | 1.0 | SUVs |
| 3 | 0.7 | Coupes |
| 4 | 1.0 | Muscle |
| 5 | 1.0 | Sports Classics |
| 6 | 1.0 | Sports |
| 7 | 1.0 | Super |
| 8 | 0.3 | Motorcycles |
| 9 | 1.0 | Off-road |
| 10 | 1.0 | Industrial |
| 11 | 1.0 | Utility |
| 12 | 1.0 | Vans |
| 13 | 0.0 | Cycles |
| 14 | 1.0 | Boats |
| 15 | 2.3 | Helicopters |
| 16 | 1.0 | Planes |
| 17 | 0.7 | Service |
| 18 | 0.7 | Emergency |
| 19 | 0.7 | Military |
| 20 | 1.0 | Commercial |
| 21 | 1.0 | Trains |
EXPORTS
| EXPORT | ARGS | RETURN |
|---|---|---|
exports['BigDaddy-Fuel']:IsElectric(vehicle) |
vehicle [int] | true/false |
exports['BigDaddy-Fuel']:GetFuel(vehicle) |
vehicle [int] | 0-100 [float] |
exports['BigDaddy-Fuel']:SetFuel(vehicle, fuelLevel) |
vehicle [int], fuelLevel [float] | VOID |
EXAMPLE
IsElectric
function IsElectric()
local veh = GetVehiclePedIsIn(PlayerPedId(), false)
if veh ~= nil then
local electric = exports['BigDaddy-Fuel']:IsElectric(veh)
return electric
end
end
GetFuel
function GetFuel()
local veh = GetVehiclePedIsIn(PlayerPedId(), false)
if veh ~= nil then
local fuel = exports['BigDaddy-Fuel']:GetFuel(veh)
print('Fuel: ' .. fuel)
end
end
SetFuel
function SetFuel(level)
local veh = GetVehiclePedIsIn(PlayerPedId(), false)
if veh ~= nil then
exports['BigDaddy-Fuel']:SetFuel(veh, level)
print('Set Fuel: ' .. level)
end
end
EVENTS
Server events
BigDaddy-Fuel:SetPowerStatus(bool)
-
true = power is on
-
false = power is off
This will set whether there is a blackout or not, if you have something like that in your server. The BigDaddy-Blackout script does this automatically. If there is a blackout pumps are disabled due to now power. But this event is here if you wanted to integrate that functionality into a different script.
HOW TO PLAY
Follow the on screen prompts. Drive up to a pump, grab the nozzle, put it into the car to fuel. Same with EVs, use the chargers around the map. For aircraft, spawn a fueltruck, drive close to aircraft, get out and grab nozzle, go to aircraft where nozzle icon shows up, put nozzle in. When done fueling or charging anything, remove nozzle from vehicle, replace in pump/charger.
There is also a sort of hidden command:
/setfuel n, n being a number between 0 (empty) and 100 (full tank/charge). Works for both gas and electric. It's meant to be a backup method if you come across a vehicle you just can't fuel/charge or if you need a specific fuel level for a scene.