Exports

isDoingSomething

RegisterCommand("isdoingsomething", function()
    local animation = {
        animDict = "anim@heists@ornate_bank@hostages@hitman",
        anim = "hitman_c",
        flags = 1,
    }
    if (exports["uiforge-progressbar"]:isDoingSomething()) then
        return print("player not available")
    else
        TaskPlayAnim(PlayerPedId(), animation.animDict, animation.anim, 3.0, 3.0, -1, animation.flags or 1, 0, false, false, false)
    end
end)

Progress

exports['uiforge-progressbar']:Progress({
        name = name:lower(),
        duration = duration,
        label = label,
        useWhileDead = useWhileDead,
        canCancel = canCancel,
        controlDisables = disableControls,
        animation = animation,
        prop = prop,
        propTwo = propTwo,
        icon = icon
    }, function(cancelled)
        if not cancelled then
            if onFinish then
                onFinish()
            end
        else
            if onCancel then
                onCancel()
            end
        end
    end)

Last updated