opx_infinityprogress
Events
Last updated on
Network and local events and page channels of the progress module.
A server module starts a bar through the server contract, which numbers it, sends opx:net:progress:start, and judges the client's report by its own clock.
opx:net:progress:start
Server → client. Starts a bar owned by @server. A client Stop cannot end it.
TriggerClientEvent('opx:net:progress:start', playerId, spec)- spec:
table— as inStart, plusidwhen the server wants to hear how it ended
opx:net:progress:cancel
Server → client. Ends a bar owned by @server with stopped.
TriggerClientEvent('opx:net:progress:cancel', playerId, id)- id?:
integer— only that bar; a stop for an older bar leaves the one up alone
opx:net:progress:report
Client → server. How a numbered bar ended: refused at once when the client cannot draw it, or the bar's ending. The server believes only the ending, never the timing.
TriggerServerEvent('opx:net:progress:report', id, ending)opx:on:progress:finished
Server, host-wide. The server's verdict on a bar it started. See Public server events.
AddEventHandler('opx:on:progress:finished', function(playerId, payload) end)- payload:
{ id, owner, ending, completed, elapsedMs }— onlycompleted = truemeans the action happened
opx:on:progress:done
Client, local. The bar ended.
AddEventHandler('opx:on:progress:done', function(done) end)- done:
tableowner,label:stringending:string—finished,stopped,cancelledorinterruptedfinished:boolean— onlytruemeans the action happened
opx:on:progress:state
Client, local. A bar went up or down.
AddEventHandler('opx:on:progress:state', function(state) end)- state:
table—{ open, owner?, label? }
Page channels
On the overlay surface.
| Channel | Direction | Payload | Meaning |
|---|---|---|---|
progress:show | Lua → page | { label, durationMs, cancelable, cancelKey } | Show the bar; the page animates from the duration. cancelable is true only when the bar allows it and the cancel key is registered; cancelKey is the bound key's label (drawn in the hint). |
progress:hide | Lua → page | {} | Hide the bar. |
progress:cancel | page → Lua | — | Removed. The player cancels with CANCEL_KEY instead. |