Progress bar (client)

Client-only progress bars. No server implementation.

openprogressbar(data)

Signature: openprogressbar(data: OxProgressBar): boolean?

openProgressBar is the same function (alias on every provider).

ParamType
dataOxProgressBar

| Returns | boolean?true completed, false cancelled |

local finished = bridge.progressbar.openprogressbar({
    duration = 5000,
    label = 'Harvesting honey...',
    canCancel = true,
    disable = { move = true, combat = true },
    anim = {
        dict = 'amb@world_human_gardener_plant@male@base',
        clip = 'base',
    },
})
 
if finished then
    TriggerServerEvent('myresource:finishHarvest')
end

progressActive() (optional)

Signature: progressActive(): boolean

| Providers | Real on ox_lib and lation_ui. zsx_uiv2 tracks its own callback. wasabi_uikit / progressbar always return false. | | Returns | boolean |

if bridge.progressbar.progressActive() then return end

cancelProgress() (optional)

Signature: cancelProgress(): void

| Providers | Real on ox_lib and lation_ui. Other adapters are no-ops (zsx_uiv2 has no cancel export). | | Description | Cancels the active progress bar |

bridge.progressbar.cancelProgress()

Types

OxProgressBar

FieldType
durationnumber ms
labelstring
canCancelboolean?
useWhileDeadboolean?
allowRagdollboolean?
allowSwimmingboolean?
allowCuffedboolean?
allowFallingboolean?
animOxProgressAnim?
disableOxProgressDisable?
propOxProgressProp | OxProgressProp[]?
position'middle' | 'bottom' ox_lib

OxProgressAnim

FieldType
dictstring?
clipstring?
flagnumber?
scenariostring?

OxProgressDisable

FieldType
moveboolean?
sprintboolean?
carboolean?
combatboolean?
mouseboolean?