⛽️ [PAID] [QBCore][Standalone][ESX] Fuel system - Different designs | Different types of fuel | Convenient configuration file | Electric and Conventional Refueling | UI | Burevestnik

fuelsystem

I welcome you CFX community!

Today i present to you a fuel system categorized by vehicle types that will bring more diversity to the gameplay on your server. I am confident that you and your players will find it appealing!

This system boasts a user-friendly interface that showcases various fuel options for different types of cars. In addition, it features a distinct fuel consumption mechanism within each vehicle and much more.

Demonstration of the system:

:movie_camera: Preview Video

Screenshots

Example of a configuration file:

Configuration files
-- /* 
-- ██████╗░██╗░░░██╗██████╗░███████╗██╗░░░██╗███████╗░██████╗████████╗███╗░░██╗██╗██╗░░██╗
-- ██╔══██╗██║░░░██║██╔══██╗██╔════╝██║░░░██║██╔════╝██╔════╝╚══██╔══╝████╗░██║██║██║░██╔╝
-- ██████╦╝██║░░░██║██████╔╝█████╗░░╚██╗░██╔╝█████╗░░╚█████╗░░░░██║░░░██╔██╗██║██║█████═╝░
-- ██╔══██╗██║░░░██║██╔══██╗██╔══╝░░░╚████╔╝░██╔══╝░░░╚═══██╗░░░██║░░░██║╚████║██║██╔═██╗░
-- ██████╦╝╚██████╔╝██║░░██║███████╗░░╚██╔╝░░███████╗██████╔╝░░░██║░░░██║░╚███║██║██║░╚██╗
-- ╚═════╝░░╚═════╝░╚═╝░░╚═╝╚══════╝░░░╚═╝░░░╚══════╝╚═════╝░░░░╚═╝░░░╚═╝░░╚══╝╚═╝╚═╝░░╚═╝*/

Config = {}

Config.framework = exports["es_extended"]:getSharedObject() --ESX | QBCore -> exports['qb-core']:GetCoreObject()

payFuel = function(fuelPrice, input, vehType) --Set up your framework here.
    --ESX
    local player = Config.framework.GetPlayerFromId(source)
	if player.getMoney() >= tonumber(fuelPrice) then
		player.removeMoney(fuelPrice)
		TriggerClientEvent('bur_fuelsystem:refuel', source, input, vehType)
	else 
		TriggerClientEvent('bur_fuelsystem:burExitUI', source)
		TriggerClientEvent('esx:showNotification', source, Config.Translation['nomoney'])
	end
    --QBCore
	--local player = Config.framework.Functions.GetPlayer(source)
	--if player.PlayerData.money["cash"] >= tonumber(fuelPrice) then
		--player.Functions.RemoveMoney('cash', fuelPrice, "Bank depost")
		--TriggerClientEvent('bur_fuelsystem:refuel', source, input, vehType)
	--else 
	--	TriggerClientEvent('bur_fuelsystem:burExitUI', source)
	--	TriggerClientEvent("QBCore:Notify", source, Config.Translation['nomoney'], "success", 2500)
	--end
end

-- Use Burevestnik Interaction Button (https://forum.cfx.re/t/free-standalone-interaction-button/4860169)
Config.UseBurevestnikInteractionButton = false

DisplayHelpText = function(str)
    SetTextComponentFormat("STRING")
    AddTextComponentString(str)
    DisplayHelpTextFromStringLabel(0, 0, false, -1)
end

HelpNotificationBottom = function(text)
    BeginTextCommandThefeedPost("STRING")
    AddTextComponentSubstringPlayerName(text)
    EndTextCommandThefeedPostTicker(true, true)
end

Config.ObjeFuel = {-2007231801, 1339433404, 1694452750, 1933174915, -462817101, -469694731, -164877493}
Config.FuelOpenButton = 38
Config.interactionDistance = 4.0
Config.Translation = {
    ['menu'] = 'Press ~INPUT_CONTEXT~ to ~g~interact',
    ['nomoney'] = '~r~You do not have enough Money!',
	['noaccess'] = '~g~Your vehicle tank is full!',
	['wrongtypeoffuel'] = '~r~Incorrect fuel type!',
	['BurevestnikInteractionButton'] = 'E',
	['BurevestnikInteractionButtonText'] = 'Press to interact',
	['UIexit'] = 'EXIT',
	['UIgs1'] = 'GAS STATION',
	['UIgs1name'] = 'Burevestnik OIL',
	['UIfuel1'] = 'Regular',
	['UIfuel2'] = 'Premium',
	['UIfuel3'] = 'Diesel',
	['UIfuel4'] = 'ECO',
	['UIgs1text1'] = 'PRICE PER GALLON',
	['UIcost'] = 'COST',
	['UIfueltypetext'] = 'Your fuel type',
	['UIfueltypetitletext'] = 'Cash',
	['UIfueltypetext2'] = 'Processing...',
	['UIgs1pay'] = 'PAY AND REFUEL',
	['UIgs2'] = 'ELECTRIC CHARGING',
	['UIgs2name'] = 'Burevestnik STATION',
	['UIgs2text1'] = 'PRICE PER KW',
	['UIgs2pay'] = 'CONNECT THE CHARGER AND PAY',
	['UIcurrency'] = '$',
	['UIbar'] = 'Fueling in progress...',
}

Config.useFuelConsumption = true
vehicleFuelConsumption = function(playerPed, vehicle)
	if GetVehicleFuelLevel(vehicle) > 0 then 
		SetVehicleFuelLevel(vehicle, GetVehicleFuelLevel(vehicle) - (GetVehicleEstimatedMaxSpeed(vehicle)/1000))
	end
end

Config.useSpecificfuel = true
Config.classes = { 
	{
		vehicleClass = {1,2,3,4,8,9,13,18},
		fuelType = "regular",
	},
	{
		vehicleClass = {5,6,7},
		fuelType = "premium",
	},
	{
		vehicleClass = {10,11,12,14,15,16,17,19,20,21,22},
		fuelType = "disel",
	}
}

Config.electricVehicles = {
	"Voltic",
    "Voltic2",
    "Dilettante",
    "Dilettante2",
    "Cyclone",
    "Cyclone2",
    "Raiden"
}

Config.regularFuelPrice = 1
Config.premiumFuelPrice = 2
Config.diselFuelPrice = 3
Config.ecoFuelPrice = 4

Config.GasStationsBlips = {
	{
        useBlip = true,
        blipID = 415, --Blip ID.
        blipScale = 0.6, --Blip scale.
        blipColor = 51, --Blip color.
        blipDisplay = 4, --Blip display.
        blipText = "Gas station", --Blip text.
		location = {
			vector3(49.4187, 2778.793, 58.043),
			vector3(263.894, 2606.463, 44.983),
			vector3(1039.958, 2671.134, 39.550),
			vector3(1207.260, 2660.175, 37.899),
			vector3(2539.685, 2594.192, 37.944),
			vector3(2679.858, 3263.946, 55.240),
			vector3(2005.055, 3773.887, 32.403),
			vector3(1687.156, 4929.392, 42.078),
			vector3(1701.314, 6416.028, 32.763),
			vector3(179.857, 6602.839, 31.868),
			vector3(-94.4619, 6419.594, 31.489),
			vector3(-2554.996, 2334.40, 33.078),
			vector3(-1800.375, 803.661, 138.651),
			vector3(-1437.622, -276.747, 46.207),
			vector3(-2096.243, -320.286, 13.168),
			vector3(-724.619, -935.1631, 19.213),
			vector3(-526.019, -1211.003, 18.184),
			vector3(-70.2148, -1761.792, 29.534),
			vector3(265.648, -1261.309, 29.292),
			vector3(819.653, -1028.846, 26.403),
			vector3(1208.951, -1402.567,35.224),
			vector3(1181.381, -330.847, 69.316),
			vector3(620.843, 269.100, 103.089),
			vector3(2581.321, 362.039, 108.468),
			vector3(176.631, -1562.025, 29.263),
			vector3(-319.292, -1471.715, 30.549),
			vector3(-722.6, -1472.88, 5.01),
			vector3(1784.324, 3330.55, 41.253)
		}
    },
}

--Exports
--exports.Burevestnik_fuelsystem:Burevestnik_fuelsystem_getFuel()  
--exports.Burevestnik_fuelsystem:Burevestnik_fuelsystem_setFuel(amount) -- 1.0/5.7/24.4 etc

Optimization (The script consumes):

0.00 ms in a quiet state.

0.03 ms in an active state.

What does this system include:

  • This system works on all versions of ESX, QBCore, as well as STANDALONE!
  • Detailed configuration file!
  • Beautiful user interface!
  • Unique fuel consumption system for each vehicle!
  • Support for our :nazar_amulet: [FREE][Standalone] Interaction Button | Text UI resource !
  • You can change the price for a different type of fuel!
  • Ability to select the required type of fuel depending on the type of car!
  • The ability to link the gas station location to the object!
  • There are more than 20 preset refueling locations, and it’s also easy to add new ones!
  • Exports are available!
  • Of course support, I’m ready to help you!

:shopping_cart: [OPEN SOURCE] You can get that resource in my Tebex.

:shopping_cart: [ESCROW] You can get that resource in my Tebex.

TOP SALES

qs3 hudsystem-min bpLogo

You may also be interested in my other resources:

mg crate Anomaly zones img

animsystem bpLogo hudsystem-min

OrangeSystem barsystem storev2

qs3 dialSystem speedcam_img

lockpick train LicensePlate

pop 6q6g5y as

mg ars fuelsystem

mwpLG8T - Imgur e5f6ad277b5836eb5fa4db2b8207c3e46beb8362 imgonline-com-ua-Resize-czg8px7HwUHn

My project (1) My project (5) My project

kaws My project (6) a

bgk bg bg

st11

Code accessible Open source: Yes \ Escrow: No - Available only: config, ui
Subscription based No
Lines (approximately) ~1600
Requirements Standalone/ESX/QBCore
Support Yes
5 Likes
🛒 [PAID][Standalone][ESX] Store system - Black market system | Shop robberies | Advanced Shops | Customizable Shops | Shops | UI
🎭 [PAID][Standalone] Animation menu - Walkingstyles | Keybinding | Dances | Emotes | UI | Animation system
🌳 [PAID][MLO] The Mighty Bush | Gardening services | Burevestnik
💎 [PAID] [Standalone][ESX][QBCore] Crate system | Rewards tiers | Interactions | Huge configuration file | Burevestnik
☄️ [PAID] [Standalone][ESX][QBCore] Anomaly zones | Effects | Rewards | Zones | Huge configuration file | Burevestnik
🎭 [PAID] [Standalone][ESX][QBCore] Animation menu V2 - Walkingstyles | Keybinding | Dances | Emotes | UI | Animation system | Burevestnik
🍊 [PAID] [Standalone][ESX][QBCore] Collecting oranges system | Orange Farm | UI | Realistic collection system | Orange job | Burevestnik
🍻 [PAID][Standalone][ESX] Bar system | Realistic drinking system | Realistic intoxication | Burevestnik
🛒 [PAID] [Standalone][ESX][QBCore] Store system V2 - Black market system | Shop system | Shop robberies | Advanced Shops | Customizable Shops | Shops | UI | Burevestnik
💬 [PAID] [Standalone][ESX][QBCore] Dialogue system - Talk to NPC | Creating dialogs | UI | Burevestnik
📸 [PAID] [Standalone][ESX][QBCore] Speed cameras system - Radar system | Traffic fines | UI | Burevestnik
🔓 [PAID] [Standalone][ESX][QBCore] Uncharted lockpick minigame | UI | Burevestnik
🚂 [PAID] [Standalone][ESX][QBCore] Train ticket system - Teleportation | location configuration | UI | Burevestnik
🥮 [PAID][Standalone][ESX] Fidget Pop It | Unique prop | Minigame | UI | Burevestnik
🚙 [PAID] [Standalone][ESX][QBCore] Vehicle Interaction Bundle | UI | Radar system | License plate change system | Burevestnik
👁‍🗨 [PAID] [Standalone][ESX][QBCore] [Bundle] Quest system + dialog system | Burevestnik
🎮 [PAID][Standalone] Minigame Bundle - Minigames | Entertainments | UI | Burevestnik
📦 [PAID][Standalone][ESX] Arsenal system - Customizable arsenals | For any job or for everyone | Items/Weapons | UI | Burevestnik
🚚 [PAID][ESX] Trucker work system - Different loads | Delivery | Delivery on your own/company's truck | Cargo | UI | Burevestnik
💼 [PAID][Standalone][ESX] Job center system | Job menu | Employment | List of works | UI | Burevestnik
📜 [PAID][Standalone][ESX] Menu system - Interactive menu system | Custom menu | Individual menu | Menu permissions | UI | Burevestnik
💰 [PAID][ESX][QBCore] Burglary system - Minigame | Notification to the police | Different levels | Reward | UI | Burevestnik
💸 [PAID][ESX] Auction system - Bet | Extras | Realization | Sale | Burevestnik
🚀 [PAID] [Standalone][ESX][QBCore] Quest system | Mission system - Passing/Creating missions, tasks with rewards | UI | Quest creator | Missions Creator | RPG | Burevestnik
🤖 [PAID][Props] Kaws toy collection | Various props | Ability to use with animations | Burevestnik
🎆 [PAID][STANDLONE] Concentration minigame | UI | Burevestnik
🎇 [PAID][Standalone] Memory minigame | UI | Burevestnik
⌨️ [PAID][Standalone] Keyboard hero minigame | UI | Burevestnik
🌟 [PAID][Standalone] Lovely Loading Screen | Burevestnik
🔮 [PAID][Standalone] Elegant Loading Screen | Burevestnik
:sponge: [PAID] [Standalone][ESX][QBCore] Window cleaner job system | UI | Burevestnik
🔩 [PAID] [Standalone][ESX][QBCore] Welding job system | UI | Burevestnik
🚀 [PAID][Standalone] Quest system - Passing/Creating missions, tasks with rewards | UI
🚗 [PAID] [Standalone][ESX][QBCore] License plate change system - Different types of plates | Saving to the DB | UI | Burevestnik
✂️ [PAID][Standalone][ESX] Barber shop system | UI | Burevestnik
🔒 [FREE][Standalone] Lockpick minigame | UI | Burevestnik
🌌 [FREE][Standalone] GTA IV Loading Screen | Burevestnik
⚓️ [PAID][MLO] Boat shop | Mission Row | Burevestnik
🏠[PAID] [Standalone][ESX][QBCore] Apartments system | House system | UI | Burevestnik
🧿 [FREE][Standalone] Interaction Button | Text UI | Burevestnik
🖥[PAID] [Standalone][ESX][QBCore] Crypto mining system | UI | Burevestnik
🅿️ [PAID] [Standalone][ESX][QBCore] Garage system | Boat garage | Aircraft garage | Advanced garages | UI | Burevestnik
👔 [PAID][Standalone][ESX] Clothing shop system | UI | Burevestnik
🚀 [PAID][ESX][QBCore] Quest system - Passing/Creating missions, tasks with rewards | UI
🪙 [PAID] [Standalone][ESX][QBCore] Bank system | Banking | Burevestnik
🥸 [PAID] [Standalone][ESX] Character creator system | identity system | skin changer system
🪄 [PAID] [Standalone][ESX][QBCore] HUD system | UI | Speedometer | Indicators | Money | Burevestnik
🔥 [PAID] [Standalone][ESX][QBCore] Battle pass system | UI | Rewards | Tasks | Burevestnik
🚗 [PAID] [Standalone][ESX][QBCore] Vehicle shop system | Boat shop | Aircraft Shop | Advanced Shops | Customizable Shops | UI | Burevestnik
🧱 [PAID][MLO] Hideout | Post-apocalyptic Safe house | Mission Row | Burevestnik
🍔 [PAID][MLO] Butter Burgers | Restaurant | Mission Row | Burevestnik

What about saving the cars fuel data?

1 Like

Amazing :star_struck:

1 Like

Fuel values are saved.
If you get in and out of the car, the fuel level will be unchanged. If you park the car in the garage, it should also be preserved.
I hope I answered the question correctly. :slightly_smiling_face:

2 Likes

will the standalone work with QB no issues?

1 Like

Everything will work fine, the only thing you will need to change the money function, if you need it :cowboy_hat_face:

1 Like

What is the difference premium, petrol and diesel

1 Like

The first difference is in price, the other is an improvement in the performance of the car engine :fuelpump:

1 Like

Maybe something like add that every car use a specific type of fuel, and if u put the wrong one it will damage the engine on the way.
Cool script btw

1 Like

Great idea, I’ll release an update in a couple of hours! :wink:
Thanks for the feedback!

1 Like

Update 1.2.0 of all versions :fuelpump:

  • Added the ability to select the required type of fuel depending on the type of car.
    If you fill the car, ship, plane with the wrong fuel, then your engine will start to smoke and lose functionality.

https://i.imgur.com/stvdTcC.mp4

Contact me if you have any questions.

2 Likes

Is it possible to implement a working petrol can?

1 Like

It can be implemented as an item with different types of fuel for ESX. :rocket:

1 Like

Would be awesome :wink:

1 Like

Nice release

1 Like

Update 1.3.0 of all versions :fuelpump:

  • Added the possibility of cans with different types of fuel as an item (ESX).

Contact me if you have any questions.

2 Likes

Update 1.4.0 of all versions :fuelpump:

  • Fixed a bug where it was impossible to use canisters in some cases.
  • Added SQL file to quickly add items to use (ESX only).
  • Improved, now when refueling with unsuitable fuel, it will be impossible to refuel the car at 100%, your fuel level will automatically become 8%.
  • Minor bugs have been fixed.

Contact me if you have any questions.

2 Likes

Update 1.5.0 of all versions :fuelpump:

  • Fixed an error when sometimes nearby cars were refueled with the same fuel as the refueling car, which caused the car to break down.
  • Minor bugs have been fixed.

Contact me if you have any questions.

1 Like

Update 1.6.0 of all versions :fuelpump:

  • Added a free camera.

Contact me if you have any questions.

1 Like

Could you send me a new version ?

1 Like