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.
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