Client
progressBar
fjsf.progressBar(data)Displays a blocking progress bar on the screen and waits until it finishes or is canceled.
The function is promise-based and pauses execution until the progress completes or is interrupted.
Parameters
data
tableProgress bar configuration object.Supported fields:
duration
numberDuration of the progress in milliseconds.text
stringMain text displayed on the progress bar.description
string | nilOptional description text displayed below the main text.canCancel
boolean | nilWhether the progress can be canceled by the player. Defaults totrue.
Player state conditions
useWhileDead
boolean | nilAllow progress while the player is dead.allowRagdoll
boolean | nilAllow progress while ragdolled.allowSwimming
boolean | nilAllow progress while swimming.allowCuffed
boolean | nilAllow progress while cuffed.allowFalling
boolean | nilAllow progress while falling.
Runtime state conditions
disableMove
boolean | nilCancel progress if the player moves or walks.disableCarMovement
boolean | nilCancel progress if the vehicle starts moving.checkFalling
boolean | nilCancel progress if the player begins falling.disableWeapons
boolean | nilCancel progress if the player equips a weapon.disableMouse
boolean | nilCancel progress if the player moves the camera.checkAlive
boolean | nilCancel progress if the player dies.checkRagdoll
boolean | nilCancel progress if the player becomes ragdolled.checkSwimming
boolean | nilCancel progress if the player starts swimming.checkCuffed
boolean | nilCancel progress if the player gets cuffed.checkVehicle
boolean | nilCancel progress if the player enters or exits a vehicle.
Visual configuration
icon
string | nilFontAwesome icon class.iconAnim
string | nilIcon animation class (default:spin).color
string | nilProgress accent color (CSS value).background
string | nilBackground color (CSS value).size
string | nilProgress bar size.Allowed values:
smallmediumlarge
position
string | nilScreen position.Supported values:
right-upright-middleright-downcenter-upcenter-middlecenter-downleft-upleft-middleleft-down
sounds
boolean | nilEnables sound effect when the progress starts.
Animation
anim
table | nilAnimation configuration.dict
stringAnimation dictionary.clip
stringAnimation clip name.blendIn
number | nilBlend-in speed.blendOut
number | nilBlend-out speed.duration
number | nilAnimation duration.flag
number | nilAnimation flags.playbackRate
number | nilAnimation playback rate.
Scenario
scenario
string | nilGTA scenario name. Used only ifanimis not provided.
Prop
prop
table | nilProp configuration.model
numberModel hash of the prop.bone
number | nilPed bone index (default:60309).pos
vector3 | nilPosition offset.rot
vector3 | nilRotation offset.rotOrder
number | nilRotation order.
Returns
boolean
true– Progress finished successfullyfalse– Progress was canceled or could not be started
Example
cancelProgressBar
Cancels the currently active progress bar.
This immediately stops the progress, clears animations and props, and resolves the progress as canceled.
Returns
This function does not return anything.
Example
Last updated