Client side

ToggleHud

---@param bool? Toggle the hud on or off (if not provided, it will toggle the hud)
exports["tgg-hud"]:ToggleHud(bool)

IsSeatbeltOn

---@return bool
exports["tgg-hud"]:IsSeatbeltOn()

Progress Bar

StartProgress

local data = {
    label = 'Example', -- The label that will be displayed
    duration = 5000, -- The duration of the progress bar in milliseconds
    canCancel = true, -- If the player can cancel the progress
    useWhileDead = false, -- If the player can use the progress bar while dead
    animation = { -- The animation that will be played
        animDict = 'anim@heists@ornate_bank@hack', -- The animation dictionary
        anim = 'hack_loop', -- The animation name
        flag = 49, -- The animation flag
        scenario = 'PROP_HUMAN_BUM_BIN', -- The scenario that will be played
    },
    prop = { -- The prop that will be displayed
        model = `prop_tgg_computer`, -- The prop model
        bone = 60309, -- The bone id
        coords = { x = 0.0, y = 0.0, z = 0.0 }, -- The prop attachment offset
        rotation = { x = 0.0, y = 0.0, z = 0.0 }, -- The prop attachment rotation
    },
    controlDisables = { -- The controls that will be disabled
        disableMovement = true, -- If the player movement will be disabled
        disableCarMovement = true, -- If the player car movement will be disabled
        disableMouse = false, -- If the player mouse will be disabled
        disableCombat = true, -- If the player combat will be disabled
    },
}
local success = exports['tgg-hud']:StartProgress(data)
if success then
    print('Success')
else
    print('Failed')
end

CancelProgress

exports['tgg-hud']:CancelProgress()

IsProgressActive

---@return boolean
exports['tgg-hud']:IsProgressActive()

Last updated