Progressbar

πŸ“˜ FRKN Progressbar Export

A custom progressbar system for FiveM, inspired by QBCore.Functions.Progressbar, but built into frkn-notify.


πŸ“Œ Usage

exports['frkn-uikit']:Progressbar(
    "progressbar-1",                -- Default Progressbar Style
    "Drinking Water...",            -- Label (text displayed to the player)
    5000,                           -- Duration in milliseconds
    false,                          -- useWhileDead (false means player cannot use it while dead)
    true,                           -- canCancel (true means it can be cancelled by pressing keys like ESC/Backspace)
    {                               -- Disable Controls
        disableMovement = true,
        disableCarMovement = true,
        disableMouse = false,
        disableCombat = true,
    },
    {                               -- Animation details
        animDict = "mp_player_intdrink",
        anim = "loop_bottle",
        flags = 49,
    },
    {                               -- First Prop (Water Bottle)
        model = "prop_ld_flow_bottle", 
        bone = 60309,                 -- Left Hand Bone ID
        coords = vec3(0.0, 0.0, 0.0), -- X, Y, Z Offset Coordinates
        rotation = vec3(0.0, 0.0, 0.0), -- X, Y, Z Rotations
    },
    {},                               -- Second Prop (Optional, leave empty if not needed)
    function()                        -- onFinish callback
        print("Player successfully drank the water.")
        -- Logic for healing, reducing thirst, or removing the item from inventory goes here
    end,
    function()                        -- onCancel callback
        print("Drinking action was cancelled by the player!")
end)

Last updated