










Fill up, plug in, run dry: your players will feel every litre. A complete fuel and EV system with realistic consumption, hose refuelling, a jerrycan minigame, chargers and a HUD. The server prices and charges every purchase.
fuel state bag updated and answers GetFuel / SetFuel calls.rd_fuel resource, v1.0, with English and Spanish texts.rd_ev_charger.png) and three auto-installed SQL tables.WEAPON_PETROLCAN, 20 L): fill it with a minigame where you pay what you pour.Config.ElectricModels./fuelstations: add stations in place or by aiming, edit them, place the attendant, scan for pump models, export a config block, reset. Saved to SQL and synced live./setfuel <0-100> [plate].Config.AllowExternalSetFuel: accept levels set by other scripts (default) or strict mode.rd_fuel in your resources and stop any other fuel resource.items/ox_inventory.lua into ox_inventory/data/items.lua (or items/qb-core.lua). The jerrycan is the native WEAPON_PETROLCAN your inventory already defines.Config.AutoInstallSQL = true (rd_fuel_vehicles, rd_fuel_stations, rd_fuel_meta), or import sql/install.sql.ensure rd_bridge, then ensure rd_fuel, before scripts that call its exports.provide line in the manifest to serve scripts that call GetFuel / SetFuel under another resource name.QBCore · Qbox · ESX · standalone through rd_bridge (adapters reviewed against each resource's official documentation).
Uses the Entity(vehicle).state.fuel state bag. Its GetFuel / SetFuel exports match scripts written for LegacyFuel, cdn-fuel and ps-fuel (optional provide for each); their other exports are not covered.
Protected with Cfx.re Asset Escrow; config.lua, locales, SQL, items and the UI files stay editable.
First release — report any issue and we fix it.
GetFuel(vehicle), SetFuel(vehicle, pct), EnsureVehicleMaxEnergy, ApplyMaxVehicleEnergy, GetHudEnergy, IsElectricVehicle.RefillByPlate(plate, level?, energyType?, model?), SetFuelByPlate, GetFuelByPlate, SetFuel(entity, pct), GetFuel(entity).Entity(vehicle).state.fuel (0-100).Run "Scan nearby objects" in /fuelstations and add the model to Config.PumpProps. Check you are inside a station radius.
Have it call SetFuel, or RefillByPlate from the server.
Add a station with kind = 'electric' or keep chargeAtFuelStations on.
Not fully. A modified client can change its local tank, and with the default AllowExternalSetFuel = true it can save a few free refills per minute. Set it to false for strict mode. A player who disconnects mid-refuel is not refunded.
Not yet. This is v1.0, reviewed by hand. Report any issue and we fix it.
Reposta, enchufa, quédate seco: tus jugadores notarán cada litro. Un sistema completo de combustible y eléctricos con consumo realista, repostaje con manguera, bidón con minijuego, cargadores y HUD. El servidor calcula y cobra cada compra.
fuel y responde a GetFuel / SetFuel.rd_fuel, v1.0, con textos en español e inglés.rd_ev_charger.png) y tres tablas SQL que se instalan solas.Consumo
Gasolineras
WEAPON_PETROLCAN, 20 L): se llena con un minijuego en el que pagas lo que echas.Vehículos eléctricos
Config.ElectricModels.Herramientas de admin
/fuelstations: añade estaciones donde estás o apuntando, edítalas, coloca al dependiente, busca modelos de surtidor, exporta un bloque de config y restablece. Se guarda en SQL y se sincroniza al momento./setfuel <0-100> [matrícula].Config.AllowExternalSetFuel: acepta los niveles que fijan otros scripts (por defecto) o modo estricto.rd_fuel a tus recursos y para cualquier otro recurso de combustible.items/ox_inventory.lua en ox_inventory/data/items.lua (o items/qb-core.lua). El bidón es el arma nativa WEAPON_PETROLCAN, que tu inventario ya define.Config.AutoInstallSQL = true (rd_fuel_vehicles, rd_fuel_stations, rd_fuel_meta), o importa sql/install.sql.ensure rd_bridge y luego ensure rd_fuel, antes de los scripts que usan sus exports.provide del manifest para atender a scripts que llaman a GetFuel / SetFuel con otro nombre de recurso.QBCore · Qbox · ESX · standalone mediante rd_bridge (adaptadores revisados contra la documentación oficial de cada recurso).
Usa el state bag Entity(vehicle).state.fuel. Sus exports GetFuel / SetFuel encajan con scripts hechos para LegacyFuel, cdn-fuel y ps-fuel (con un provide opcional para cada uno); el resto de sus exports no se cubre.
Protegido con Cfx.re Asset Escrow; config.lua, locales, SQL, ítems y los archivos de la interfaz siguen siendo editables.
Primera versión: si encuentras cualquier fallo, avísanos y lo corregimos.
GetFuel(vehicle), SetFuel(vehicle, pct), EnsureVehicleMaxEnergy, ApplyMaxVehicleEnergy, GetHudEnergy, IsElectricVehicle.RefillByPlate(plate, level?, energyType?, model?), SetFuelByPlate, GetFuelByPlate, SetFuel(entity, pct), GetFuel(entity).Entity(vehicle).state.fuel (0-100).El surtidor no responde.
Usa «Escanear objetos cercanos» en /fuelstations y añade el modelo a Config.PumpProps. Comprueba que estás dentro del radio de una estación.
Mi garaje saca coches con combustible aleatorio.
Haz que llame a SetFuel, o a RefillByPlate desde el servidor.
Los eléctricos no cargan.
Añade una estación con kind = 'electric' o deja activado chargeAtFuelStations.
¿Es a prueba de trampas?
No del todo. Un cliente modificado puede cambiar su depósito local y, con el valor por defecto AllowExternalSetFuel = true, guardar algunos rellenos gratis por minuto. Ponlo en false para el modo estricto. Si un jugador se desconecta a mitad del repostaje, no se le devuelve el dinero.
¿Se ha usado ya en servidores reales?
Todavía no. Es la v1.0, revisada a mano. Si encuentras algún fallo, avísanos y lo corregimos.