Client Exports
👁️ toggleHud
Hide or show the entire HUD (including the minimap).
-- show: boolean - true to show, false to hide, nil to flip
exports['kartik-hud']:toggleHud(show)
-- example: hide the HUD during a cutscene
exports['kartik-hud']:toggleHud(false)
-- ...and bring it back
exports['kartik-hud']:toggleHud(true)isHudVisible
local visible = exports['kartik-hud']:isHudVisible()| Returns | Type | |
|---|---|---|
visible | boolean | Whether the HUD is currently on screen |
🔫 setWeaponAmmoOverride
Overrides the clip and reserve ammo shown for the equipped weapon. Useful for inventories that store ammo separately from GTA's own weapon ammo.
The override only changes what the HUD shows, it doesn't add or remove ammo. It stays until the weapon changes or clearWeaponAmmoOverride is called.
-- clipAmmo: integer - ammo loaded in the weapon
-- reserveAmmo: integer - spare ammo, or -1 to show unlimited (∞)
local success = exports['kartik-hud']:setWeaponAmmoOverride(clipAmmo, reserveAmmo)
-- example: 7 rounds loaded and 21 in the inventory
exports['kartik-hud']:setWeaponAmmoOverride(7, 21)| Returns | Type | |
|---|---|---|
success | boolean | Whether a weapon was out and the values were valid |
Call it again whenever your inventory's ammo changes.
clearWeaponAmmoOverride
Clears the override and goes straight back to GTA's own ammo values.
exports['kartik-hud']:clearWeaponAmmoOverride()🎬 toggleCinematic
Turn cinematic mode on or off, hides the HUD, the minimap and GTA's HUD, with the player's letterbox bars.
-- state: boolean - true on, false off, nil to flip
local on = exports['kartik-hud']:toggleCinematic(state)| Returns | Type | |
|---|---|---|
on | boolean | Whether cinematic mode is now on |
isCinematic
local on = exports['kartik-hud']:isCinematic()toggleHud or toggleCinematic? Use toggleHud when your script needs the HUD out of the way (cutscenes, custom menus). Use toggleCinematic when the player wants a clean screen, it also hides GTA's own HUD and draws their bars.
✨ Custom statuses & buffs
registerStatus, addBuff, setStatusValue and the rest are on their own page: Custom Statuses & Buffs.
🖥️ Opening menus
exports['kartik-hud']:openSettings() -- the /hud menu
exports['kartik-hud']:openEditMode() -- edit mode
exports['kartik-hud']:openBuilder() -- the HUD Builder (checks the builder ACE)Vehicle controls
exports['kartik-hud']:openVehicleControl() -- same as pressing F6 (does nothing outside a vehicle)
exports['kartik-hud']:closeVehicleControl()