Client Exports
HUD Visibility
Show, hide, or toggle the entire HUD at runtime. This is separate from the player-loaded lifecycle — it’s intended for scripts that need to clear the screen (cutscenes, minigames, photo mode, etc.).
exports["bablo-hud"]:ShowHud()
exports["bablo-hud"]:HideHud()
exports["bablo-hud"]:ToggleHud()
-- return: bool - whether the HUD is currently visible
exports["bablo-hud"]:IsHudVisible()Per-Component Visibility
Hide or show individual HUD components. Useful when you only want to suppress part of the HUD (e.g. hide the player info panel during a cutscene but keep the speedometer).
Valid component names:
status, speedometer, playerInfo, minimap, voice,
notifications, progressBar, controlHints
-- component: string - one of the names listed above
-- visible: bool - true to show, false to hide
exports["bablo-hud"]:SetComponentVisible(component, visible)
-- return: bool - whether the component is currently visible
exports["bablo-hud"]:IsComponentVisible(component)Examples:
-- Hide just the player info panel
exports["bablo-hud"]:SetComponentVisible("playerInfo", false)
-- Hide the minimap (also hides the native GTA radar)
exports["bablo-hud"]:SetComponentVisible("minimap", false)
-- Restore the speedometer
exports["bablo-hud"]:SetComponentVisible("speedometer", true)Notifications
Show a notification with a title, body, type and duration.
-- title: string - notification title
-- body: string - notification body text
-- type: string - "primary" | "success" | "error" | "info" | "warning"
-- duration: number - duration in milliseconds
exports["bablo-hud"]:Notify(title, body, type, duration)Progress Bar
Start a progress bar. Accepts an optional callback that fires when the bar finishes or is cancelled.
-- data: table
-- duration: number - duration in milliseconds (required)
-- label: string - label shown on the bar (default: "Processing...")
-- color: string - "primary" | "success" | "error" | "info" | "warning"
-- control: string - key hint shown to the player (e.g. "E")
-- useWhileDead: bool - keep the bar running while the player is dead (default: false)
-- controlDisables: table - input groups to lock while the bar is active:
-- disableMovement: bool
-- disableCarMovement: bool
-- disableMouse: bool
-- disableCombat: bool
-- animation: table - animation to play while the bar is active (optional)
-- -- Option A: native GTA animation
-- animDict: string - animation dictionary
-- anim: string - animation name
-- flags: number - animation flags (default: 1)
-- -- Option B: bablo-animations (requires bablo-animations resource)
-- babloAnim: string - animation name registered in bablo-animations
-- prop_left: table - prop attached to the left hand while the bar is active (optional)
-- model: string - prop model name
-- bone: number - ped bone index (default: 60309)
-- coords: table - position offset { x, y, z }
-- rotation: table - rotation offset { x, y, z }
-- prop_right: table - prop attached to the right hand, same structure as prop_left (optional)
--
-- cb: function(cancelled: bool) - called when the bar finishes or is stopped early
exports["bablo-hud"]:ProgressBar(data, cb)Examples:
-- Simple bar
exports["bablo-hud"]:ProgressBar({ duration = 5000, label = "Searching..." })
-- With bablo-animations and callback
exports["bablo-hud"]:ProgressBar({
duration = 8000,
label = "Picking lock...",
animation = { babloAnim = "lockpick" },
controlDisables = { disableMovement = true, disableCombat = true },
}, function(cancelled)
if not cancelled then
-- success
end
end)
-- With native animation and props on both hands
exports["bablo-hud"]:ProgressBar({
duration = 8000,
label = "Repairing...",
color = "success",
controlDisables = { disableMovement = true, disableCombat = true },
animation = {
animDict = "mini@repair",
anim = "fixing_a_ped",
flags = 49,
},
prop_left = {
model = "prop_tool_wrench",
bone = 28422, -- PH_L_Hand
coords = { x = 0.0, y = 0.0, z = 0.0 },
rotation = { x = 0.0, y = 0.0, z = 0.0 },
},
prop_right = {
model = "prop_tool_screwdvr01",
bone = 60309, -- PH_R_Hand
coords = { x = 0.0, y = 0.0, z = 0.0 },
rotation = { x = 0.0, y = 0.0, z = 0.0 },
},
}, function(cancelled)
if not cancelled then
-- repair complete
end
end)Stop Progress Bar
Stops the current progress bar immediately. If a callback was provided to
ProgressBar, it will fire with cancelled = true.
exports["bablo-hud"]:StopProgressBar()Cinematic Mode
Toggle, set, or query the cinematic letterbox mode.
-- active: bool - whether cinematic mode is active
exports["bablo-hud"]:SetCinematic(active)
exports["bablo-hud"]:ToggleCinematic()
-- return: bool - whether cinematic mode is currently active
exports["bablo-hud"]:IsCinematicActive()Seatbelt
Toggle the seatbelt or check the current state. Requires Config.Seatbelt.enabled = true.
exports["bablo-hud"]:ToggleSeatbelt()
-- return: bool - whether the seatbelt is fastened
exports["bablo-hud"]:IsSeatbeltOn()Stress System
Read and write the integrated stress value. Requires Config.Stress.integrated = true.
-- return: number - current stress value (0-100)
exports["bablo-hud"]:GetStress()
-- value: number - new stress value (clamped to config min/max)
exports["bablo-hud"]:SetStress(value)
-- amount: number - amount to add
exports["bablo-hud"]:AddStress(amount)
-- amount: number - amount to remove
exports["bablo-hud"]:RemoveStress(amount)Minimap
Utilities to work with the styled minimap.
-- return: table - x, y, w, h anchor of the minimap in screen space
exports["bablo-hud"]:getAnchor()
-- visible: bool - show or hide the native radar
exports["bablo-hud"]:setRadarVisible(visible)
