Client side
General
ToggleHud
lua---@param bool? Toggle the hud on or off (if not provided, it will toggle the hud) exports["tgg-hud"]:ToggleHud(bool)
IsSeatbeltOn
lua---@return bool exports["tgg-hud"]:IsSeatbeltOn()
ToggleSeatbeltIndicator
lua--- NOTE: This export only modifies the seatbelt state visually. --- Used to toggle show/hide the seatbelt indicator and buckle/unbuckle the seatbelt. --- And modify the buckled seatbelt color. ---@param toggle boolean - Whether to toggle show/hide the seatbelt indicator. ---@param buckle boolean - Whether to buckle/unbuckle the seatbelt. ---@param color string - The color of the buckled seatbelt. exports["tgg-hud"]:ToggleSeatbeltIndicator(toggle, buckle, color)
Progress Bar
StartProgress
lualocal 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
luaexports['tgg-hud']:CancelProgress()
IsProgressActive
lua---@return boolean exports['tgg-hud']:IsProgressActive()