Wert Racing Hud

You can access the setup information you need about this product

INSTALLATION

1 - Upload the script folder to the location of your resources

2 - You can check the config file and customize it according to yourself

3 - Installation successful, have a good funs

EXPORTS


-- # Used for the position indicator
exports['wert-racehud']:PositionUI('Update', {
    currentPosition = currentPosition, -- Current position | number or string
    maxPosition = maxPosition -- Max position | number or string
})
exports['wert-racehud']:PositionUI('Close')

-- # Used for lap indicator
exports['wert-racehud']:LapUI('Update', {
    currentLap = currentLap, -- Current lap | number or string
    maxLap = maxLap, -- Max lap | number or string
    lapHeader = lapHeader -- Lap header | string
})
exports['wert-racehud']:LapUI('Close')

-- # Used for scoreboard drivers
exports['wert-racehud']:RankUI('Update', {
    players = {
        { name = 'Player Name', flag = 'Flag URL' },
    },
    myName = 'My Character Name',
    myFlag = 'Flag URL',
    myBestTime = '01:00:00'
})
exports['wert-racehud']:RankUI('Close')

-- # Best lap information ui
exports['wert-racehud']:BesttimeUI('Update', {
    currentLap = currentLap, -- Current lap | number or string
    bestTime = bestTime, -- Best time | number or string
    calculateTime = calculateTime -- Calculate new - old | number or string
})
exports['wert-racehud']:BesttimeUI('Close')

-- # Update nitrous bar
-- nitrousLevel : Level ( number )
-- boolean : true or false
exports['wert-racehud']:UpdateNitrous(nitrousLevel, boolean)

-- # Toggle belt
exports['wert-racehud']:ToggleSeatbelt()

OPEN FILES

Config file

Config = {
    EnableMiniMap = false, -- # If players want to hide, they can use hud menu ( If u enable this option )
    FPSBoost = false,
    SpeedType = 'mph', -- 'kmh' or 'mph'
    weatherIconTypes = {
        [`XMAS`] = true,
        [`SNOW`] = true,
        [`SNOWLIGHT`] = true,
        [`RAIN`] = true,
    },
    kmhSpeedRate = 3.6,
    mphSpeedRate = 2.23694,
    noGearText= 'N',
    minimumEngineTemp = 35,
    hudMenuCommand = 'racehud',
    hudMenuLabel = 'Open Race Hud Menu',
    hudMenuKey = {
        active = true,
        key = 'G',
    },
}

Editable client file


function CustomGetVehicleFuel(veh) -- # Get vehicle fuel
    local amount = 50
    if GetResourceState('LegacyFuel') == 'started' then
        amount = math.floor(exports['LegacyFuel']:GetFuel(veh))
    end
    return amount
end

function LoadMiniMap() -- # Load mini map codes
    if not Config.EnableMiniMap then return end
    local posX = 0.01
    local posY = 0.0 -- 0.0152
    local width = 0.183
    local height = 0.32 --0.354
    RequestStreamedTextureDict("circlemap", false)
	while not HasStreamedTextureDictLoaded("circlemap") do Wait(100) end
    AddReplaceTexture("platform:/textures/graphics", "radarmasksm", "circlemap", "radarmasksm")
	SetMinimapClipType(1)
	SetMinimapComponentPosition('minimap', 'L', 'B', posX, posY, width, height)
	SetMinimapComponentPosition('minimap_mask', 'L', 'B', posX, posY, width, height)
	SetMinimapComponentPosition('minimap_blur', 'L', 'B', 0.012, 0.022, 0.256, 0.337)
    SetRadarBigmapEnabled(true, false)
    Wait(0)
    SetRadarBigmapEnabled(false, false)
end

Lang file

LANG = {
    position = 'POSITION',
    menuLabel = 'Hud Settings',
    showState = 'Show / Hide Hud',
    mapState = 'Show / Hide Minimap',
    gradientState = 'On / Off Gradient Colors',
    topPosition = 'Top Position (Y)',
    leftPosition = 'Left Position (X)',
    hudScale = 'General Hud Scale',
    off = 'OFF',
    on = 'ON',
}

FINISH

Last updated