Progress with actions
ProgressoAcao waits for the bar to finish, locks controls and can play an animation and hold a prop. Returns true (finished) or false (cancelled).
The format is the same as ox_lib’s lib.progressBar.
your_script/client.lua
local ok = exports.gui_interface:ProgressoAcao({
duration = 5000,
label = "Repairing",
canCancel = true, -- cancel with X (Config.progresso.teclaCancelar)
disable = { move = true, car = true, combat = true },
anim = { dict = "mini@repair", clip = "fixing_a_player" },
prop = { model = "prop_tool_wrench", bone = 57005, pos = vec3(0.1, 0.0, 0.0), rot = vec3(0.0, 0.0, 0.0) },
})
if ok then
-- finished
endOptions
| Option | What it does |
|---|---|
duration | Duration in ms. |
label | Bar text. |
canCancel | Allows cancelling with the Config.progresso.teclaCancelar key. |
useWhileDead | Works while the player is dead. |
allowRagdoll | Does not cancel if the player ragdolls. |
allowFalling | Does not cancel if the player is falling. |
disable | move, car, combat, mouse, sprint. |
anim | dict, clip, flag; or scenario = "WORLD_HUMAN_HAMMERING". |
prop | model, bone, pos, rot. Accepts a list of props. |
Simple bar
Only shows the bar. Does not wait and does not lock anything.
exports.gui_interface:Progresso(5000, "Eating")Stop and check
exports.gui_interface:PararProgresso()
local running = exports.gui_interface:ProgressoAtivo()ProgressoAcao exists only on the client. From the server, use Progresso(source, ms, text).