![[PAID] [QB/ESX] TebIT: Fuel main image](https://forum-cfx-re.akamaized.net/optimized/4X/2/7/b/27b2dfd2c2b2ad2b20af8c2a3a95198f3912c1a3_2_690x388.jpeg)
Price
UnknownA script by TebIT
Price
UnknownThis resource is intended to give greater control over vehicle fuel economy, while adding another layer of variation and tuning capabilities for our upcoming vehicle tuning resource.
All of the config vars found below are stored within the config.lua
file.
config = {
-- Interact distance for players. Vehicle interact distance is 2x this.
interactDist = 2.5,
-- Hose distance, aka maximum distance for the nozzle to reach.
hoseDist = 5.0,
-- Minimum distance to stations to consider any actions.
renderDist = 25.0,
-- Size (litres) of a jerry can (or battery, for EVs).
jerryCanSize = 10.0,
-- How long it takes to refuel using a jerrycan (or battery).
jerryCanTime = 5000,
-- On refueling (nozzle attached to vehicle, actively pumping fuel), when player drives away with nozzle attached.
allowRefuelingExplosions = true,
-- Keep nozzle attached after explosion? May help police figure out who caused a petrol bowser explosion in the area.
keepNozzleAttached = true,
-- Controls how blips are displayed.
-- 0 = off
-- 1 = all on
-- 2 = display only closest
blipDisplay = 2,
-- Blip data.
blip = {
label = "Fuel Station",
sprite = 361,
color = 1,
alpha = 150,
scale = 0.5,
display = 2,
highDetail = true,
shortRange = true
},
-- How much fuel is drained per fuelDrainRate.
fuelDrainRate = 0.01,
-- How fast to drain fuel.
-- NOTE: With 1.0 fuelDrainRate, and 1000 fuelDrainTime, the drain rate for any vehicle (other modifiers not considered)
-- would equate to exactly 1% of your fuel being drained every 1000ms (1 second).
fuelDrainTime = 10000,
-- Base refuel rate.
-- Can be supplemented further with individual station pump speeds.
refuelAddRate = 5.0,
-- Fuel economy based on vehicle class
-- Lower = less fuel used
classEconomy = {
[0] = 0.5,
...
},
-- Fuel tank size based on vehicle class
-- Lower value = less time to burn max fuel reserve,
-- also less time to refuel vehicle at station.
classTank = {
[0] = 0.6,
...
},
-- How much fuel is used at given RPM
rpmUsage = {
[1.0] = 1.00,
...
},
electricVehicles = {
`Imorgon`,
...
},
}
For information on fuel station definitions and config options, read the documentation
All existing stations are already pre-configured within the data/stations.lua
file.
You can define new addon pumps in here.
For information regarding fuel type definition and stat configuration, read the documentation
A working example can found in the data/fueltypes.lua
file.
All labels and translations can be found within the labels.lua
file.
labels = {
no_vehicles_nearby = "No vehicle nearby",
empty_driverseat_required = "Vehicle must not have a driver",
...
}
Check out the wiki for an update-to-date list of dependencies, conflicting resources, examples, and proper export documentation. You can otherwise contact me via DM for further instruction.
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 2000 + |
Requirements | ti_utils |
Support | Yes |
No approved reviews found for this script yet.