Progress Bar

Standalone progress bar with clean design and segmented bars

Exports

Progress Bar

exports.ls_progressbar:progressBar(data)

IMPORTANT: only fontawesome icon is supported!

params:[
    data: 'table' [
        label: 'string',
        icon: 'string',
        duration: 'number',
        
        canCancel: 'boolean',
        useWhileDead: 'boolean',
        allowRagDoll: 'boolean',
        allowSwimming: 'boolean',
        allowCuffed: 'boolean',
        allowFalling: 'boolean',
        
        disable: 'table' [
            move: 'boolean',
            car: 'boolean',
            combat: 'boolean',
            mouse: 'boolean',
            sprint: 'boolean'
        ],
        anim: 'table' [
            dict: 'string',
            clip: 'string',
            scenario: 'string',
            flag: 'number',
            blendIn: 'float',
            blendOut: 'float',
            duration: 'number',
            playbackRate: 'number'
            lockX: 'boolean',
            lockY: 'boolean',
            lockZ: 'boolean',
            playEnter: 'boolean'
        ],
        prop: 'table' [
            bone: 'number',
            rotOrder: 'number',
            pos: 'table' [
                x: 'number',
                y: 'number',
                z: 'number',
            ],
            rot: 'table' [
                x: 'number',
                y: 'number',
                z: 'number',
            ]
        ]
    ]
]

Example:
local retreval = exports.ls_progressbar:progressBar({
        label = 'Example Progress Bar',
        duration = 5000,
        canCancel = true,
        disable = {
            car = true,
        },
        anim = {
            dict = 'mp_player_intdrink',
            clip = 'loop_bottle'
        },
        prop = {
            model = `prop_ld_flow_bottle`,
            pos = vec3(0.03, 0.03, 0.02),
            rot = vec3(0.0, 0.0, -1.5)
        },
})

if retreval then
    print('success')
else
    print('failed')
end

return the ran of state (true, false)

Cancel

exports.ls_progressbar:cancel()

Cancel the current progress bar

Is Progress Active

local retreval = exports.ls_progressbar:isProgressActive()

if retreval then
    print('progressbar is currently active')
else
    print('progressbar currently not active')
end

retunr the current progressbar state (true, false)

Last updated