MLS Fuel
A fuel script where you actually use the pump.
Discord :
Park next to it, get out, and the pump of the station's brand shows up on screen. LTD, Globe Oil, Xero or RON, each with its own look. Orange digits, price per gallon with that little 9 at the end (4.59⁹), and the buttons you'd find at any gas station in Los Santos: Regular 87, Plus 89, Premium 93, Diesel and E85.
Pick a grade, go for a full tank or $20 / $50 / $100, pay by card or cash, lift the nozzle. Your character holds it while the gallons go up on the display. Let go halfway and the change comes back to you.
Gas isn't the same price everywhere. Every station has its own, and it moves a bit every day. The cheap one across town might be worth the drive.
Not set in the US?
Change one line in the config and you get a European pump instead: litres, price per litre, and the E10 / E5 / E85 / B7 / B7+ labels you see at stations in Europe. Same screen, same brands.
Electric and hybrid cars
Electric cars can't use the pumps, they go to the chargers. A ring fills up as the battery charges, with the kW (it slows down past 80 %, like a real fast charger) and the time left. You choose 80 %, 100 % or an amount. Plug-in hybrids can do both. Electric cars also drain faster the faster you drive.
Diesel, petrol and your mechanics
A petrol car can't take diesel and vice versa, the button is greyed out. If you want more RP, turn on wrong fuel: the player can make the mistake, and the engine won't start until a mechanic fixes it.
Mechanics can also fit a Flex-Fuel kit on petrol cars so they can run on E85, the cheapest fuel at the pump. The kit stays with the car (saved by plate).
What's in the box
-
4 versions: Standalone, ESX, QBCore and QBox. Each one is its own resource, you only install the one you need.
-
ox_target, qb-target, or the E key if you use neither. It figures it out on its own.
-
English and French. Another language is one file to copy and translate.
-
US or European pump.
-
One config for everything: prices, fuels, tank sizes, which cars are electric, diesel or hybrid, card and/or cash, currency, size and position of the screen.
-
Your own brands with your logo and colours.
-
A hook for receipts, logs or Discord webhooks after each fill-up.
-
Nothing to import in your database.
-
GetFuel and SetFuel exports with the same names as ox_fuel, so most HUDs and garages keep working.
About cheating
Prices, payments, the amount pumped and the fuel level are all handled by the server. A modded client can't fill up for free, pay twice or raise its own fuel level. If a player walks away, disconnects or the script restarts in the middle of a fill-up, they get refunded what wasn't pumped.
Requirements
ox_lib for every version. oxmysql for ESX, QBCore and QBox. ox_inventory for QBox. ox_target, qb-target and ox_inventory are optional on the others.
Before you buy
-
Use it alone, remove your current fuel script first.
-
Stations from custom MLOs have to be added in
data/stations.lua. The file is open and commented. -
Your garage needs to save the fuel level, otherwise it resets when the car respawns.
-
In the Standalone version fuel is free by default. If you have your own money system, there are hooks to plug it in.
Config, translations and station data are not encrypted. Any question or problem, come by the Discord.
MLS Fuel (FR)
Un script d'essence où tu te sers vraiment de la pompe.
Tu te gares, tu descends, et la pompe de l'enseigne s'affiche : LTD, Globe Oil, Xero ou RON, chacune avec son look. Chiffres orange, prix au gallon avec le petit 9 à la fin (4.59⁹), et les touches qu'on trouve dans n'importe quelle station de Los Santos : Regular 87, Plus 89, Premium 93, Diesel et E85. Tu choisis, tu prends le plein ou 20 / 50 / 100 $, tu paies en carte ou en liquide, et les gallons défilent pendant que ton perso tient le pistolet. Si tu lâches avant, on te rend la monnaie. Les prix changent d'une station à l'autre et d'un jour à l'autre.
Ton serveur se passe en Europe ? Une ligne dans la config et tu passes en pompe européenne : litres, E10 / E5 / E85 / B7 / B7+.
Les électriques vont aux bornes de recharge rapide (anneau de charge, kW, temps restant), les hybrides peuvent aller aux deux. Diesel et essence ne se mélangent pas, et si tu actives l'option, une erreur de carburant casse le moteur jusqu'au passage d'un mécano. Les mécanos peuvent aussi poser un kit E85 sur les voitures essence.
4 versions (Standalone, ESX, QBCore, QBox), ox_target, qb-target ou touche E, français et anglais, tout se règle dans la config, rien à importer en base. L'argent et le niveau d'essence sont gérés par le serveur.
Prérequis : ox_lib, oxmysql (ESX/QBCore/QBox), ox_inventory (QBox).