lation scripts
scriptsmembershipdocs
see the scripts
Skip to Content
lation ui
ThemingConfigurationChangelog

Developer API

Shared optionsNotificationsProgress barAlert dialogInput dialogContext menuList menuRadial menuText UITimelineDrawerMinigames
lation interact
lation banking
lation shops
lation jobs
lation weed
lation chop shop

classics

money laundering
drug sales
coke processing
meth crafting
metal detecting
scuba diving
lation ui

Progress bar

Run a lation ui progress bar with an animation, props other players see, steps, blocked controls and cancel handling, and check or cancel it from your script.

The progress bar shows a timed action at the bottom center of the screen. It can play an animation or scenario, attach props that other players see, block controls, and split the bar into steps. The call waits until the bar ends and tells you whether it completed.

A progress bar titled Repairing engine with a wrench icon at 42%, Hold still under the title, and Press X to cancel at the bottom
The repair example, partway through

progressBar

Client export

local completed = exports.lation_ui:progressBar(data)

Parameters

data.durationnumber
How long it runs, in milliseconds. Above 0, or the call returns false at once.
data.labelstringoptionaldefault 'Progress'
The text above the bar. title works too.
data.descriptionstringoptional
Smaller text under the label
data.iconstringoptional
An icon before the label
data.iconColorstringoptional
The icon's color. The theme's muted text by default.
data.iconAnimationstringoptional
See icon animations
data.colorstringoptional
The bar's fill color. The theme's accent by default.
data.stepstableoptional
A list of { description = '...' }. The duration is split evenly between them, the current step's description takes the place of description, and dots beside the percentage show the step.
data.canCancelbooleanoptionaldefault true
Lets the player cancel with the Cancel Progress key (X by default)
data.useWhileDeadbooleanoptionaldefault false
Keep running while the player is dead
data.allowRagdollbooleanoptionaldefault false
Keep running while ragdolled
data.allowCuffedbooleanoptionaldefault false
Keep running while cuffed
data.allowFallingbooleanoptionaldefault false
Keep running while falling
data.allowSwimmingbooleanoptionaldefault false
Keep running while swimming
data.animtableoptional
An animation or scenario to play. See anim.
data.proptableoptional
One prop, or a list of props, to attach. See prop.
data.disabletableoptional
Controls to block while the bar runs. See disable.

Returns

boolean
true when the bar completes; false when it's cancelled or interrupted, or the data is invalid

The call waits for the bar, so run it from a thread, command or event handler. If another bar is already running, it waits for that one to end before it starts.

The bar is interrupted, and returns false, as soon as the player is dead, ragdolled, cuffed, falling or swimming, unless the matching option above allows it. If one of those is already true when you call it, it returns false without showing the bar.

While a bar runs, lation ui sets LocalPlayer.state.invBusy and LocalPlayer.state.inv_busy to true, and back to false when it ends, so inventories that read them stay closed during the action.

client.lua
local done = exports.lation_ui:progressBar({
    label = 'Repairing engine',
    description = 'Hold still',
    duration = 8000,
    icon = 'fas fa-wrench',
    canCancel = true,
    disable = { move = true, car = true, combat = true },
    anim = { dict = 'mini@repair', clip = 'fixing_a_ped' }
})

if done then
    -- give the reward
else
    -- the player cancelled or was interrupted
end

With steps:

client.lua
if exports.lation_ui:progressBar({
    label = 'Initializing hack',
    duration = 10000,
    icon = 'fas fa-crosshairs',
    iconColor = '#EF4444',
    color = '#EF4444',
    steps = {
        { description = 'Connecting to server...' },
        { description = 'Bypassing security protocols...' },
        { description = 'Establishing secure connection...' },
        { description = 'Hack in progress...' }
    }
}) then
    print('Success')
end
A red progress bar titled Initializing hack at 58%, three of its four step dots lit, and its third step, Establishing secure connection..., under the title
The steps example, on its third step

With a prop:

client.lua
exports.lation_ui:progressBar({
    label = 'Drinking coffee',
    duration = 5000,
    anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
    prop = {
        model = 'p_amb_coffeecup_01',
        bone = 28422,
        pos = { x = 0.0, y = 0.0, z = 0.0 },
        rot = { x = 0.0, y = 0.0, z = 0.0 }
    }
})

anim

FieldTypeDefaultDescription
dictstringThe animation dictionary. Loaded for you.
clipstringThe animation's name in dict.
flagnumber49The animation flag.
blendInnumber3.0Blend-in speed.
blendOutnumber1.0Blend-out speed.
durationnumber-1The animation's length in milliseconds. -1 plays until stopped.
playbackRatenumber0The playback rate.
lockX, lockY, lockZbooleanLock the ped's position on that axis.
scenariostringA scenario to play instead of dict and clip. Used only when dict isn't set.
playEnterbooleantruePlay the scenario's enter animation.

When the bar ends, an animation from dict is stopped; for a scenario, the ped's tasks are cleared.

prop

FieldTypeDefaultDescription
modelstring or numberRequired. The model name or hash.
bonenumber60309The ped bone to attach to.
postableRequired. The offset, { x = 0.0, y = 0.0, z = 0.0 }.
rottableRequired. The rotation, { x = 0.0, y = 0.0, z = 0.0 }.
rotOrdernumber0The rotation order.

Pass a list of these tables to attach more than one; the lation_ui:progressPropLimit convar (default 2) caps how many. Props are removed when the bar ends.

Other players see the props too. The server checks each one before sharing it: model must be a string or number, and pos and rot plain tables with numeric x, y and z (not vector3). A prop that fails the check shows only for the player running the bar. Each new bar's props replace the last ones for everyone, and they go the moment the bar ends, even one cancelled as it starts. The server shares one set of props per player every 100 ms; a bar that starts sooner gets its props a moment later, so back-to-back bars both show theirs.

disable

Set any of these to true to block it:

FieldBlocks
moveWalking, sprinting and crouching
sprintSprinting only
carSteering, accelerating, braking and leaving the vehicle
combatAiming and firing
mouseLooking around with the camera

cancelProgress

Client export

local cancelled = exports.lation_ui:cancelProgress()

Returns

boolean
true if a bar was running, false otherwise

Cancels the running bar from your script, even when its canCancel is false. Its progressBar call returns false.

client.lua
-- Stop the repair if the vehicle explodes
if IsEntityDead(vehicle) then exports.lation_ui:cancelProgress() end

progressActive

Client export

local active = exports.lation_ui:progressActive()

Returns

boolean
true while a progress bar runs
client.lua
if exports.lation_ui:progressActive() then return end -- busy, try again later

Still stuck? Ask in our Discord: the people who write the scripts answer.

Last updated November 10, 2026

Notifications

Show, update and style lation ui notifications from client or server scripts with the notify export and the lation_ui:notify event.

Alert dialog

Ask the player to confirm or cancel with a lation ui alert dialog, with optional callouts, button text, sizes and styles, and close it from your script.

On this page

progressBaranimpropdisablecancelProgressprogressActive
lation scripts

FiveM scripts for Qbox, QBCore and ESX servers, made to look and work like one product.

store

  • all scripts
  • membership
  • classics

help

  • docs
  • discord
  • email support

legal

  • terms
  • refunds
  • privacy
© 2026 Lation Labslationscripts.com
  • home
  • scripts
  • membership
  • docs