Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Bienvenue Guest!

Rejoignez la communauté pour avoir accès à l'entièreté du site! Une fois que vous serez enregistré, vous pourrez créer, aider, partager et discuter avec les membres de la communauté et également participer à l'amélioration du site. Alors, qu'attendez vous ? Enregistrez-vous !

Sign in to follow this  
Kanda Sorata

release [RELEASE] - Système d'essence FrFuel

Recommended Posts

Kanda Sorata

Nom de la ressource : FrFuel
Auteur de la ressource : https://forum.fivem.net/u/thers
Lien de téléchargement de la ressource : https://ci.appveyor.com/api/buildjobs/rf6mf0vnkyf1uv72/artifacts/frfuel_v1.6.0.zip

Description de la ressource :


  • Fuel level synchronized between players vehicles
  • Vehicle’s dashboard shows actual fuel level
  • Randomized fuel level for NPC’s vehicles
  • RPM based fuel consumption
  • Vehicle max torque and acceleration has impact on overall fuel consumtion rate
  • Original fuel tank capacity for every vehicle, taken from handling
  • All gas stations that is in game are available
  • Events
  • External API
  • Configurable both fuel consumption rate and refueling rate, so you can fine-tune it exactly for your needs


  1. Download zip archive from lastest release and unzip it to your resources folder.
  2. Add start frfuel line to your server.cfg.

Known issues

  1. There’re some rare incompatibility issues with VehicleControl script by Scammer.

Planned features

  • Extend fuel system to planes and boats


frfuel:refuelAllowed <- (toggle: bool)

Client event.
FRFuel listens for it.
Allows you to toggle on/off if player can refuel it’s vehicle.

frfuel:fuelAdded -> (amount: float)

Both client and server event.
FRFuel triggers it.
Allows you to get know how much fuel player just added to his vehicle.
Units for amount value could be considered as litres. Typical petrol tank volume is 65 litres in GTA.


/!\ Attention les exemples ci dessous sont en c#


Since v1.2.0 there’s an external API available for resources to work with this one:


All of the API methods only working for player’s current vehicle ONLY if player is on the driver seat


getCurrentFuelLevel(): float

Returns player’s current vehicle’s fuel level. Returns -1 if player is not in vehicle or is not on the driver seat.

addFuel(amount: float): void

Adds amount of fuel to the player’s current vehicle. Does nothing if player is not in any.

setFuel(amount: float): void

Sets amount of fuel level of the player’s current vehicle. Does nothing if player is not in any.


Lua example
--- getting level
local fuelLevel = exports.frfuel:getCurrentFuelLevel() 
--- adding more fuel
--- setting fuel level


Lien original : https://forum.fivem.net/t/release-frfuel-v1-6-0/5467

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

En utilisant ce site, vous acceptez les présents règlements Terms of Use, Privacy Policy,Guidelines.