Configuration
The full config.lua
Config = {
-- Supports Framework: ESX, QBX, QB
Framework = "ESX",
-- List of commands, change them to your liking.
Commands = {
settings = "hud", -- Command to open up the settings menu.
toggleall = "hidehud", -- Command to toggle the hud on and off.
},
-- Default HUD Settings
DefaultSettings = {
hudStyle = "square", -- Default HUD style (square or circle)
colors = {
health = "#bc2f2f", -- Default health icon color
armour = "#816db0", -- Default armor icon color
hunger = "#dba652", -- Default hunger icon color
thirst = "#6892c4", -- Default thirst icon color
border = "#FFFFFF" -- Default map border color
},
mapBorder = true, -- Default map border visibility
speedUnit = "MPH" -- Default speed unit (MPH or KPH)
},
Seatbelt = {
defaultbind = "b", -- The default bind to put on a seatbelt, you can also change this in your in-game keybinds.
eject = {
enable = true, -- If the vehicles crashes in a wall, it will eject the player from the vehicle.
speed = 45.0 -- Speed threshold for ejection (in MPH)
}
},
Notify = {
Notify = function(title, description, type)
lib.notify({
title = title,
description = description,
type = type
})
end
},
-- Here's where you can edit the function to get a vehicles fuel, I tried making it support all scripts by default. But I most likely missed a few.
FuelScript = {
GetFuel = function(vehicle)
if GetResourceState('ox_fuel') == 'started' then
return Entity(vehicle).state.fuel
elseif GetResourceState('cdn-fuel') == 'started' then
return exports["cdn-fuel"]:GetFuel(vehicle)
elseif GetResourceState('LegacyFuel') == 'started' then
return exports["LegacyFuel"]:GetFuel(vehicle)
elseif GetResourceState('rcore_fuel') == 'started' then
return exports["rcore_fuel"]:GetFuel(vehicle)
elseif GetResourceState('okokGasStation') == 'started' then
return exports["okokGasStation"]:GetFuel(vehicle)
end
return GetVehicleFuelLevel(vehicle)
end
},
-- Core Object (Don't edit this, if you dont know what you are doing)
Core = function()
if Config.Framework == "ESX" then
return exports["es_extended"]:getSharedObject()
elseif Config.Framework == "QB" then
return exports['qb-core']:GetCoreObject()
elseif Config.Framework == "QBX" then
return exports['qb-core']:GetCoreObject()
end
end,
}
Last updated