DirkScripts
Docs
Progress
#lib.progressBar
Show a progress bar. Yields until complete or cancelled.
lualocal success = lib.progressBar({ duration = 5000, label = 'Repairing vehicle...', canCancel = true, anim = { dict = 'mini@repair', clip = 'fixing_a_player', }, disable = { move = true, combat = true, }, }) if success then print('Repair complete') end
#lib.progressCircle
Same as progressBar but renders as a circular indicator.
lualocal success = lib.progressCircle({ duration = 3000, label = 'Searching...' })
#Progress Options
| Field | Type | Description |
|---|---|---|
duration | number | Duration in milliseconds |
label | string | Text displayed on the bar |
position | string | Screen position override |
icon | string | Optional icon |
description | string | Optional sub-text |
useWhileDead | boolean | Allow while dead |
allowRagdoll | boolean | Allow while ragdolled |
allowCuffed | boolean | Allow while cuffed |
allowFalling | boolean | Allow while falling |
allowSwimming | boolean | Allow while swimming |
canCancel | boolean | Allow cancelling |
anim | table | { dict, clip, flag, blendIn, blendOut } |
prop | table | { model, bone, pos, rot } |
disable | table | { car, move, combat, mouse, sprint } |
#lib.cancelProgress
Cancel the active progress bar.
lualib.cancelProgress()
#lib.progressActive
Check whether a progress action is currently active.
lualocal active = lib.progressActive()
