⚙️Script Configuration
Adjustments guide for mg-jerrycan
Framework Configuration
You can choose between oldesx, newesx, newqb, oldqb and autodetect in config file.
Config.Framework = 'newqb' -- 'oldesx' | 'newesx' | 'newqb' | 'oldqb' | 'autodetect'
Some parts of the script may not work at 100% when you choose "autodetect" I strongly recommned to only set autodetect to find what framework you are using in case you are not sure, after that select the exact one you are using.
Inventory Configuration
Config.Inventory = 'codem' -- 'qb' | 'esx' | 'ox' | 'codem' | 'qs'
If the one you want to use its not there you can add it in server/functions.lua
If you don't have knowladge with scripts and you want to add a new Inventory we suggest to ask for support in our discord!
Item Configuration
If default items get conflict with an existing item in your server you can change it from here, you can also set if you want to use the metadata system of your inventory or not.

Buy and Refill System

Config.BuyRefilSystem
This option allows players to buy new Jerrycans or refill them at special stations.
If you set it to
false
, the buy and refill system will no longer exist.
Config.InteractionHandler
This determines how the player interacts with Jerrycan stations. Options available are:
ox-target
: An interactive menu appears when near a Jerrycan station.qb-target
: A different interaction system.codem-textui
: A text-based interaction system.drawtext
: Simple text-based prompts.
Config.textUiTheme
This defines the style of the menu UI for interactions when using CodeM-TextUI.
Config.KeyLabel
Players will press
E
to open the Jerrycan menu by default.This is just a label, changing this will only change what's displayed in the drawtext or textUI.
To change the key you need to edit
Config.MenuOpenKey
.
Config.MoneyType
Players pay for Jerrycans or refills using either:
Bank Money
Cash
Config.JerrycanPrice
The price of buying a brand new Jerrycan.
Players can purchase it at gas stations if they want a full Jerrycan.
Config.RefilPrice
The price per liter to refill a Jerrycan at gas stations.
Config.MaxJerrycanFuel
The maximum per liters each Jerrycan can hold.
Distance and Time Configuration

Config.MaxDistance
The maximum distance that the player needs to be of their vehicle to successfully use the jerrycan.
Config.FuelTime
The time It takes per second to add 1% of fuel to the vehicle. You can adjust this to make refueling faster or slower.
Progress System and Menu Configuration

Config.ProgressSystem
This determines how the refueling progress is displayed to players. It creates a visual bar to show how much time the player has left while refueling.
Options available:
progressbar
: The standard progress bar used by QBCore systems.If you are on esx you can download it by clicking here.
ox_lib_bar
: A modern and stylish bar provided by theox_lib
system.ox_lib_circle
: A circular progress indicator, also provided byox_lib
.
Config.Menu
This defines the menu system used for displaying interactions at Jerrycan stations. It allows for compatibility with different frameworks and styles. Options available:
qb
: Uses qb-menu system.ox
: Uses the context menu tied toox_lib
.esx_context
: Context menus from ESX.
Fuel System Configuration
Config.FuelSystem
Config.FuelSystem
This setting determines which fuel system the server will use. It is a way to select how the game calculates and interacts with vehicle fuel levels.
Here are the options you can choose from:
LegacyFuel
x-fuel
ox-fuel
nd-fuel
frfuel
cdn-fuel
custom
Allows you to define a custom fuel system by creating their own logic or script.

Sell Locations Configuration
Here you define all the specific points on the map where players can buy or refill their Jerrycans. These points are only active when the Buy & Refill System is enabled (Config.BuyRefilSystem
). Players can approach these locations, then they can interact to buy a new Jerrycan or refill an existing one.

Last updated