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 table Progress bar configuration object.

    Supported fields:

    • duration number Duration of the progress in milliseconds.

    • text string Main text displayed on the progress bar.

    • description string | nil Optional description text displayed below the main text.

    • canCancel boolean | nil Whether the progress can be canceled by the player. Defaults to true.


Player state conditions

  • useWhileDead boolean | nil Allow progress while the player is dead.

  • allowRagdoll boolean | nil Allow progress while ragdolled.

  • allowSwimming boolean | nil Allow progress while swimming.

  • allowCuffed boolean | nil Allow progress while cuffed.

  • allowFalling boolean | nil Allow progress while falling.


Visual configuration

  • icon string | nil FontAwesome icon class.

  • iconAnim string | nil Icon animation class (default: spin).

  • color string | nil Progress accent color (CSS value).

  • background string | nil Background color (CSS value).

  • size string | nil Progress bar size.

    Allowed values:

    • small

    • medium

    • large

  • position string | nil Screen position.

    Supported values:

    • right-up

    • right-middle

    • right-down

    • center-up

    • center-middle

    • center-down

    • left-up

    • left-middle

    • left-down

  • sounds boolean | nil Enables sound effect when the progress starts.


Animation

  • anim table | nil Animation configuration.

    • dict string Animation dictionary.

    • clip string Animation clip name.

    • blendIn number | nil Blend-in speed.

    • blendOut number | nil Blend-out speed.

    • duration number | nil Animation duration.

    • flag number | nil Animation flags.

    • playbackRate number | nil Animation playback rate.


Scenario

  • scenario string | nil GTA scenario name. Used only if anim is not provided.


Prop

  • prop table | nil Prop configuration.

    • model number Model hash of the prop.

    • bone number | nil Ped bone index (default: 60309).

    • pos vector3 | nil Position offset.

    • rot vector3 | nil Rotation offset.

    • rotOrder number | nil Rotation order.


Returns

  • boolean

    • true – Progress finished successfully

    • false – 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