Configuration
Don't touch this line
Config, Lang, Noti, Blips, Fuel = {}, {}, {}, {}, {}
CONFIGURATION FILE
Config, Lang, Noti, Blips, Fuel = {}, {}, {}, {}, {}
--$$$$$$\ $$$$$$\ $$\ $$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\ $$$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\
--$$ __$$\ $$ __$$\ $$$\ $$ |$$ _____|\_$$ _|$$ __$$\ $$ | $$ |$$ __$$\ $$ __$$\\__$$ __|\_$$ _|$$ __$$\ $$$\ $$ |
--$$ / \__|$$ / $$ |$$$$\ $$ |$$ | $$ | $$ / \__|$$ | $$ |$$ | $$ |$$ / $$ | $$ | $$ | $$ / $$ |$$$$\ $$ |
--$$ | $$ | $$ |$$ $$\$$ |$$$$$\ $$ | $$ |$$$$\ $$ | $$ |$$$$$$$ |$$$$$$$$ | $$ | $$ | $$ | $$ |$$ $$\$$ |
--$$ | $$ | $$ |$$ \$$$$ |$$ __| $$ | $$ |\_$$ |$$ | $$ |$$ __$$< $$ __$$ | $$ | $$ | $$ | $$ |$$ \$$$$ |
--$$ | $$\ $$ | $$ |$$ |\$$$ |$$ | $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ | $$ | $$ | $$ |$$ |\$$$ |
--\$$$$$$ | $$$$$$ |$$ | \$$ |$$ | $$$$$$\ \$$$$$$ |\$$$$$$ |$$ | $$ |$$ | $$ | $$ | $$$$$$\ $$$$$$ |$$ | \$$ |
--\______/ \______/ \__| \__|\__| \______| \______/ \______/ \__| \__|\__| \__| \__| \______| \______/ \__| \__|
--Use "esx" or "qb"
Config.Framework = "esx"
--Default ESX: "esx:getSharedObject" | Default QB: "qb-core"
Config.Core = "esx:getSharedObject"
--Modifies the increasing amount of refilling in electric vehicles
Config.fuelPriceTickElectric = 1
--Modifies the amount that increases when refilling vehicles when refilling with Gas95
Config.fuelPriceTickGas95 = 1
--Modifies the amount that increases when refilling vehicles when refilling with Gas98
Config.fuelPriceTickGas98 = 1.2
--Time elapsed during refilling
Config.fuelingTimeTick = 10000
--If you change the following line, you must also change it in the html file, line 43
Config.electricmodel = "Electric"
--If you change the following line, you must also change it in the html file, line 47
Config.gas95 = "Gas95"
--If you change the following line, you must also change it in the html file, line 51
Config.gas98 = "Gas98"
--Acceleration that the vehicle will have when refueling with gas98
Config.gas98TorqueMultiplier = 5.0
--Account from which the user will pay for the refueling
Config.bankaccount = "bank"
--Price when buying petrol can
Config.petrolCanPrice = 800
--Set to true if using OXinventory
Config.useOXinventory = true
--Set to true if using QS-Inventory
Config.useQSinventory = false
--Set to true if you use a custom inventory. Remember to modify the function below
Config.customInventory = false
--Key to be pressed to buy a petrol can
Config.keyToBuyCan = 47
--Type of font to be used in alerts. Use 0 if your language is Chinese
Config.alertFont = 4
--$$$$$$$$\ $$\ $$\ $$$$$$$$\ $$\
--$$ _____|$$ | $$ |$$ _____|$$ |
--$$ | $$ | $$ |$$ | $$ |
--$$$$$\ $$ | $$ |$$$$$\ $$ |
--$$ __| $$ | $$ |$$ __| $$ |
--$$ | $$ | $$ |$$ | $$ |
--$$ | \$$$$$$ |$$$$$$$$\ $$$$$$$$\
--\__| \______/ \________|\________|
-- The left part is at percentage RPM, and the right is how much fuel (divided by 10) you want to remove from the tank every second
Fuel.FuelUsage = {
[1.0] = 1.4,
[0.9] = 1.2,
[0.8] = 1.0,
[0.7] = 0.9,
[0.6] = 0.8,
[0.5] = 0.7,
[0.4] = 0.5,
[0.3] = 0.4,
[0.2] = 0.2,
[0.1] = 0.1,
[0.0] = 0.0,
}
-- Class multipliers. If you want SUVs to use less fuel, you can change it to anything under 1.0, and vise versa.
Fuel.Classes = {
[0] = 1.0, -- Compacts
[1] = 1.0, -- Sedans
[2] = 1.0, -- SUVs
[3] = 1.0, -- Coupes
[4] = 1.0, -- Muscle
[5] = 1.0, -- Sports Classics
[6] = 1.0, -- Sports
[7] = 1.0, -- Super
[8] = 1.0, -- Motorcycles
[9] = 1.0, -- Off-road
[10] = 1.0, -- Industrial
[11] = 1.0, -- Utility
[12] = 1.0, -- Vans
[13] = 0.0, -- Cycles
[14] = 1.0, -- Boats
[15] = 1.0, -- Helicopters
[16] = 1.0, -- Planes
[17] = 1.0, -- Service
[18] = 1.0, -- Emergency
[19] = 1.0, -- Military
[20] = 1.0, -- Commercial
[21] = 1.0, -- Trains
}
--$$\ $$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\ $$$$$$\ $$$$$$$$\
--$$ | $$ __$$\ $$$\ $$ |$$ __$$\ $$ | $$ |$$ __$$\ $$ __$$\ $$ _____|
--$$ | $$ / $$ |$$$$\ $$ |$$ / \__|$$ | $$ |$$ / $$ |$$ / \__|$$ |
--$$ | $$$$$$$$ |$$ $$\$$ |$$ |$$$$\ $$ | $$ |$$$$$$$$ |$$ |$$$$\ $$$$$\
--$$ | $$ __$$ |$$ \$$$$ |$$ |\_$$ |$$ | $$ |$$ __$$ |$$ |\_$$ |$$ __|
--$$ | $$ | $$ |$$ |\$$$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |
--$$$$$$$$\ $$ | $$ |$$ | \$$ |\$$$$$$ |\$$$$$$ |$$ | $$ |\$$$$$$ |$$$$$$$$\
--\________|\__| \__|\__| \__| \______/ \______/ \__| \__| \______/ \________|
Lang.enter = "Press ~r~E~w~ to refuel"
Lang.enterelec = "Press ~r~E~w~ to recharge"
Lang.enterpetrolcan = "Press ~r~G~w~ to refill the tank"
Lang.buypetrolcan = "Press ~r~G~w~ to buy petrol can"
Lang.novehicle = "There is no vehicle nearby"
Lang.gasstationerror = "This gas station does not provide this service"
Lang.chargererror = "This power station does not offer this service"
Lang.noservice = "Service not available"
Lang.fueltypeerror = "Select a fuel type"
Lang.leavevehicle = "To fill the tank, you must leave the vehicle"
Lang.pay = "You have paid a total of $"
Lang.itemoninventory = "You already have this item in your inventory"
Lang.nospace = "You have no space in your inventory"
Lang.okpetrolcan = "You have purchased a petrol can for $"
Lang.refueling = "for refueling"
Lang.filled = "Fuel tank has been filled"
--$$\ $$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\
--$$$\ $$ |$$ __$$\\__$$ __|\_$$ _|$$ _____|\_$$ _|$$ __$$\ $$ __$$\\__$$ __|\_$$ _|$$ __$$\ $$$\ $$ |
--$$$$\ $$ |$$ / $$ | $$ | $$ | $$ | $$ | $$ / \__|$$ / $$ | $$ | $$ | $$ / $$ |$$$$\ $$ |
--$$ $$\$$ |$$ | $$ | $$ | $$ | $$$$$\ $$ | $$ | $$$$$$$$ | $$ | $$ | $$ | $$ |$$ $$\$$ |
--$$ \$$$$ |$$ | $$ | $$ | $$ | $$ __| $$ | $$ | $$ __$$ | $$ | $$ | $$ | $$ |$$ \$$$$ |
--$$ |\$$$ |$$ | $$ | $$ | $$ | $$ | $$ | $$ | $$\ $$ | $$ | $$ | $$ | $$ | $$ |$$ |\$$$ |
--$$ | \$$ | $$$$$$ | $$ | $$$$$$\ $$ | $$$$$$\ \$$$$$$ |$$ | $$ | $$ | $$$$$$\ $$$$$$ |$$ | \$$ |
--\__| \__| \______/ \__| \______|\__| \______| \______/ \__| \__| \__| \______| \______/ \__| \__|
Noti.error = "error"
Noti.success = "check"
Noti.time = 5000
function notifications(notitype, message, time)
--Insert here with your notification system trigger or export like this:
--exports["bit-notifications"]:Notification({['type'] = notitype,['message'] = message})
end
--$$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$\
--$$ __$$\ $$ | \_$$ _|$$ __$$\ $$ __$$\
--$$ | $$ |$$ | $$ | $$ | $$ |$$ / \__|
--$$$$$$$\ |$$ | $$ | $$$$$$$ |\$$$$$$\
--$$ __$$\ $$ | $$ | $$ ____/ \____$$\
--$$ | $$ |$$ | $$ | $$ | $$\ $$ |
--$$$$$$$ |$$$$$$$$\ $$$$$$\ $$ | \$$$$$$ |
--\_______/ \________|\______|\__| \______/
Blips.blip = 361
Blips.blipColor = 59
Blips.blipScale = 0.5
Blips.blipText = "Gas Station"
--$$$$$$$$\ $$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\
--$$ _____|$$ | $$ _____|$$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\
--$$ | $$ | $$ | $$ / \__| $$ / \__|$$ / $$ |$$ | $$ |$$ / \__|
--$$$$$\ $$ | $$$$$\ $$ | $$ | $$$$$$$$ |$$$$$$$ |\$$$$$$\
--$$ __| $$ | $$ __| $$ | $$ | $$ __$$ |$$ __$$< \____$$\
--$$ | $$ | $$ | $$ | $$\ $$ | $$\ $$ | $$ |$$ | $$ |$$\ $$ |
--$$$$$$$$\ $$$$$$$$\ $$$$$$$$\ \$$$$$$ |$$\ \$$$$$$ |$$ | $$ |$$ | $$ |\$$$$$$ |
--\________|\________|\________| \______/ \__| \______/ \__| \__|\__| \__| \______/
electricModels = { -- UPPERCASE
["AIRTUG"] = true,
["NEON"] = true,
["RAIDEN"] = true,
["CADDY"] = true,
["CADDY2"] = true,
["CADDY3"] = true,
["CYCLONE"] = true,
["DILETTANTE"] = true,
["DILETTANTE2"] = true,
["SURGE"] = true,
["TEZERACT"] = true,
["IMORGON"] = true,
["KHAMELION"] = true,
["VOLTIC"] = true,
["IWAGEN"] = true,
}
--$$$$$$\ $$\ $$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\ $$\ $$\ $$$$$$$$\ $$\ $$\ $$$$$$$$\ $$$$$$\ $$$$$$$\ $$\ $$\
--$$ __$$\ $$ | $$ |$$ __$$\\__$$ __|$$ __$$\ $$$\ $$$ | \_$$ _|$$$\ $$ |$$ | $$ |$$ _____|$$$\ $$ |\__$$ __|$$ __$$\ $$ __$$\\$$\ $$ |
--$$ / \__|$$ | $$ |$$ / \__| $$ | $$ / $$ |$$$$\ $$$$ | $$ | $$$$\ $$ |$$ | $$ |$$ | $$$$\ $$ | $$ | $$ / $$ |$$ | $$ |\$$\ $$ /
--$$ | $$ | $$ |\$$$$$$\ $$ | $$ | $$ |$$\$$\$$ $$ | $$ | $$ $$\$$ |\$$\ $$ |$$$$$\ $$ $$\$$ | $$ | $$ | $$ |$$$$$$$ | \$$$$ /
--$$ | $$ | $$ | \____$$\ $$ | $$ | $$ |$$ \$$$ $$ | $$ | $$ \$$$$ | \$$\$$ / $$ __| $$ \$$$$ | $$ | $$ | $$ |$$ __$$< \$$ /
--$$ | $$\ $$ | $$ |$$\ $$ | $$ | $$ | $$ |$$ |\$ /$$ | $$ | $$ |\$$$ | \$$$ / $$ | $$ |\$$$ | $$ | $$ | $$ |$$ | $$ | $$ |
--\$$$$$$ |\$$$$$$ |\$$$$$$ | $$ | $$$$$$ |$$ | \_/ $$ | $$$$$$\ $$ | \$$ | \$ / $$$$$$$$\ $$ | \$$ | $$ | $$$$$$ |$$ | $$ | $$ |
--\______/ \______/ \______/ \__| \______/ \__| \__| \______|\__| \__| \_/ \________|\__| \__| \__| \______/ \__| \__| \__|
--ADD PETROL CAN ITEM
function customInventoryAddItem(playerID, petrolcanPrice) -- Don't change this line
--example with ox_inventory, change the function as necessary to add the item 'WEAPON_PETROLCAN'
local petrolCan = exports.ox_inventory:GetItem(playerID, 'WEAPON_PETROLCAN', false, true) -- here it is checked if the user already has a petrol can in the inventory
if petrolCan == 0 then
local canCarry = exports.ox_inventory:CanCarryItem(playerID, 'WEAPON_PETROLCAN', 1) -- if the user does not have a petrol can, we check if it fits in the inventory
if not canCarry then
TriggerClientEvent("bit-fuel:sendNotify",playerID, Noti.error, Lang.nospace, Noti.time) --if it does not fit, a notification is sent
else
exports.ox_inventory:AddItem(playerID, 'WEAPON_PETROLCAN', 1) -- if it fits in the inventory it will be added and notification will be sent
TriggerClientEvent("bit-fuel:sendNotify",playerID, Noti.success, Lang.okpetrolcan..Config.petrolCanPrice, Noti.time)
end
else
TriggerClientEvent("bit-fuel:sendNotify",playerID, Noti.error, Lang.itemoninventory, Noti.time) -- if you already have a petrol can in the inventory a notification is sent
end
end -- Don't change this line
--REMOVE PETROL CAN ITEM
function customInventoryRemoveItem(playerID)
--example with ox_inventory, change the function as necessary to remove the item 'WEAPON_PETROLCAN'
local petrolCan = exports.ox_inventory:GetItem(source, 'WEAPON_PETROLCAN', false, true) -- here it is checked if the user already has a petrol can in the inventory
if petrolCan ~= 0 then
exports.ox_inventory:RemoveItem(source, 'WEAPON_PETROLCAN', 1) -- if the user has a petrol can in the inventory, it is deleted.
end
end
Last updated