Config File
Config = {}
-- General Settings
Config.Debug = true -- Enable debug prints
Config.UpdateInterval = 100 -- HUD update interval (ms)
-- Framework Settings
Config.Framework = 'auto' -- 'auto', 'qb', 'esx', or 'none'
Config.Seatbelt = {
Key = 29 -- Keybind to toggle seatbelt (Default: B key)
}
-- HUD Elements Visibility
Config.Show = {
TopInfo = true, -- Player ID and job
StatusBars = true, -- Health, armor, food, etc.
Minimap = true, -- Custom minimap
Speedometer = true, -- Speedometer in vehicles
MoneyInfo = true -- Cash, bank, black money
}
-- Status Defaults
Config.DefaultStatus = {
Food = 100,
Water = 100,
Stress = 0
}
Config.Stress = {
RunningIncrease = 0.1, -- Stress increase per second while running
ShootingIncrease = 1.0, -- Stress increase per shot fired
HighSpeedThreshold = 1, -- Speed (KMH) above which stress increases
HighSpeedIncrease = 0.5, -- Stress increase per second at high speed
DecayInterval = 30000, -- Time (ms) between stress decay updates
DecayAmount = 0.5, -- Amount stress decreases per decay interval
MovingRelief = 0.2 -- Stress relief per second while standing still or walking
}
-- Minimap Settings
Config.Minimap = {
ShowCompass = true, -- Show compass direction (N, E, S, W)
ShowStreet = true, -- Show street and district names
}
-- Speedometer Settings
Config.Speedometer = {
Unit = "KMH", -- "KMH" or "MPH"
KMHMultiplier = 3.6, -- Conversion factor for KMH
MPHMultiplier = 2.23694, -- Conversion factor for MPH
ShowGear = true, -- Show gear in speedometer
ShowRPM = true, -- Show RPM bar
ShowFuel = true, -- Show fuel bar
ShowStatusIcons = true -- Show seatbelt, lights, engine, cruise icons
}
-- Third-Party Integrations
Config.ThirdParty = {
Fuel = {
Enabled = true -- Use third-party fuel script if true
},
Seatbelt = {
Enabled = true, -- Use third-party seatbelt script if true
DefaultState = false -- Default seatbelt state if script not found
},
CruiseControl = {
Enabled = false -- Use third-party cruise control script if true
}
}
-- Money Display Settings
Config.Money = {
ShowCash = true, -- Show cash amount
ShowBank = true, -- Show bank amount
ShowBlackMoney = true, -- Show black money amount
CurrencySymbol = "$" -- Currency symbol for display
}
-- Auto-detection logic for framework
if Config.Framework == 'auto' then
if GetResourceState('qb-core') == 'started' then
Config.Framework = 'qb'
elseif GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
else
Config.Framework = 'none'
end
end
function DebugPrint(msg)
if Config.Debug then
print("[csHud Debug] " .. msg)
end
end
Last updated