CreatorsClient exports
StartProgress
Last updated on
Runs an OPX progress bar for your resource on the local player.
local res = exports.opx_infinity:StartProgress(spec)Sync. The end reaches your reply export as opx:on:progress:done with { owner, label, ending, finished }; only finished = true means the action completed. See the progress module.
Parameters
- spec:
table- label:
string - durationMs:
integer - cancelable?:
boolean— the player may cancel with the progressCANCEL_KEY - animation?:
{ name, variant? } - reply?:
string
- label:
Returns
{ owner, durationMs }
Errors
progress_busy(one bar at a time for the whole player),export.callerDenied,export.badArgument,error.unavailable(module not running), and the module's codes
exports.opx_infinity:StartProgress({ label = 'Packing', durationMs = 4000, cancelable = true })
AddEventHandler('opx:on:progress:done', function(p)
if p.finished then TriggerServerEvent('my_shop:packed') end
end)