# Integration

ESX Notify Integration

es\_extended/client/functions.lua

```lua
function ESX.ShowNotification(message, notifyType, length)
    notifyType = notifyType or 'success'
    length = tonumber(length) or 3000  'Default time'
    exports['frkn-uikit']:Notify(notifyType, length, message)
end
```

Esx Progressbar Integration

es\_extended/client/functions.lua

```lua
function ESX.Progressbar(message, length, options)
    length = tonumber(length) or 5000
    options = options or {}

    local progressModel = options.progressModel or "progressbar-1"
    local label = message or "Processing..."
    local duration = length or 5000
    local useWhileDead = options.useWhileDead or false
    local canCancel = options.canCancel ~= false
    local disableControls = options.disableControls or {
        disableMovement = false,
        disableCarMovement = false,
        disableMouse = false,
        disableCombat = true,
    }
    local anim = options.anim or {}
    local prop = options.prop or {}
    local propTwo = options.propTwo or {}
    local onFinish = options.onFinish
    local onCancel = options.onCancel

    exports['frkn-uikit']:Progressbar(
        progressModel, 
        label, 
        duration, 
        useWhileDead, 
        canCancel, 
        disableControls, 
        anim, 
        prop, 
        propTwo, 
        onFinish, 
        onCancel
    )
end
```

Qb Notify Integration

qb-core/server/player.lua

```lua
function self.Functions.Notify(text, type, length)
    type = type or 'success'
    length = tonumber(length) or 5

    local src = self.PlayerData.source

    if GetResourceState('frkn-uikit') == 'started' then
        TriggerClientEvent('frkn-uikit:Notify', src, type, length, text)
    else
        TriggerClientEvent('QBCore:Notify', src, text, type, length)
    end
end

```

qb-core/client/functions.lua

```lua
function QBCore.Functions.Notify(text, texttype, length, icon)
    local notifyType = texttype or 'success'
    local duration = tonumber(length) or 5
    local message = ''

    if type(text) == 'table' then
        message = text.text or 'Notification'
    else
        message = text or 'Notification'
    end

    if GetResourceState('frkn-uikit') == 'started' then
        exports['frkn-uikit']:Notify(notifyType, duration, message)
    else
        local msg = {
            action = 'notify',
            type = texttype or 'primary',
            length = length or 5000,
        }

        if type(text) == 'table' then
            msg.text = text.text or 'Placeholder'
            msg.caption = text.caption or 'Placeholder'
        else
            msg.text = text
        end

        if icon then
            msg.icon = icon
        end

        SendNUIMessage(msg)
    end
end
```

Qb Progressbar Integration

qb-core/client/functions.lua

```lua
function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
    if GetResourceState('frkn-uikit') ~= 'started' then
        error('frkn-uikit needs to be started in order for QBCore.Functions.Progressbar to work')
    end

    exports['frkn-uikit']:Progressbar(
        name or 'progressbar-1',
        label or 'Processing...',
        duration or 5000,
        useWhileDead or false,
        canCancel ~= false, 
        disableControls or {
            disableMovement = false,
            disableCarMovement = false,
            disableMouse = false,
            disableCombat = true
        },
        animation or {},
        prop or {},
        propTwo or {},
        function()
            if onFinish then
                onFinish()
            end
        end,
        function()
            if onCancel then
                onCancel()
            end
        end
    )
end

```

Qbox Notify Integration

qbx\_core/server/functions.lua

```lua
---@see client/lua:Notify
function Notify(source, text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
    local title, description
    if type(text) == 'table' then
        title = text.text or 'Placeholder'
        description = text.caption or nil
    elseif subTitle then
        title = text
        description = subTitle
    else
        description = text
    end
    local position = notifyPosition or positionConfig
    TriggerClientEvent('frkn-uikit:Notify', source, notifyType, duration, description or title, notifyModel)
end

```

qbx\_core/client/functions.lua

```lua
function Notify(text, notifyType, duration, subTitle, notifyPosition, notifyStyle, notifyIcon, notifyIconColor)
    local title, description
    if type(text) == 'table' then
        title = text.text or 'Placeholder'
        description = text.caption or nil
    elseif subTitle then
        title = text
        description = subTitle
    else
        description = text
    end
    local position = notifyPosition or positionConfig
    
    TriggerEvent('frkn-uikit:Notify', notifyType, duration, description or title, notifyModel)

end
```

Qbx Progressbar Integration

qbx\_core/bridge/qb/client/functions.lua

```lua
function functions.Progressbar(_, label, duration, useWhileDead, canCancel, disableControls, animation, prop, _, onFinish, onCancel)
    exports["frkn-uikit"]:Progressbar(
        nil,
        label,
        duration,
        useWhileDead,
        canCancel,
        disableControls,
        {
            animDict = animation and animation.animDict or nil,
            anim = animation and animation.anim or nil,
            flags = animation and animation.flags or nil
        },
        prop,
        nil,
        onFinish,
        onCancel
    )
end
```

Ox lib Integration

ox\_lib/resource/interface/client/notify.lua

<pre class="language-lua"><code class="lang-lua">function lib.notify(data)
    local notifyType = data.type or 'info'
    local duration = data.duration or 3000
    local message = data.description or data.title or "Notification"
    if GetResourceState('frkn-uikit') == 'started' then
        exports['frkn-uikit']:Notify(notifyType, duration, message)
<strong>    else
</strong>        local sound = settings.notification_audio and data.sound
        data.sound = nil
        data.position = data.position or settings.notification_position

        SendNUIMessage({
            action = 'notify',
            data = data
        })

        if not sound then return end

        if sound.bank then lib.requestAudioBank(sound.bank) end

        local soundId = GetSoundId()
        PlaySoundFrontend(soundId, sound.name, sound.set, true)
        ReleaseSoundId(soundId)

        if sound.bank then ReleaseNamedScriptAudioBank(sound.bank) end
    end
end
</code></pre>

ox\_lib/resource/interface/client/progressbar.lua

```lua
function lib.progressBar(data)
    if GetResourceState('frkn-uikit') == 'started' then
        local disable = data.disable or {}
        local anim = {}
        if data.anim then
            anim.animDict = data.anim.dict
            anim.anim = data.anim.clip
            anim.flags = data.anim.flag or 49
        end

        local result
        local finished = false

        exports['frkn-uikit']:Progressbar(
            "progressbar-1",
            data.label or "Processing...",
            data.duration or 5000,
            data.useWhileDead or false,
            data.canCancel or true,
            {
                disableMovement = disable.move or false,
                disableCarMovement = disable.car or false,
                disableMouse = disable.mouse or false,
                disableCombat = disable.combat or false,
            },
            anim,
            {},
            {},
            function() 
                result = true
                finished = true
            end,
            function() 
                result = false
                finished = true
            end
        )

        while not finished do
            Wait(0)
        end

        return result
    end

    while progress ~= nil do Wait(0) end
    if not interruptProgress(data) then
        SendNUIMessage({
            action = 'progress',
            data = {
                label = data.label,
                duration = data.duration
            }
        })
        return startProgress(data)
    end
end

```

```lua
function lib.progressCircle(data)
    if GetResourceState('frkn-uikit') == 'started' then
        local disable = data.disable or {}
        local anim = {}
        if data.anim then
            anim.animDict = data.anim.dict
            anim.anim = data.anim.clip
            anim.flags = data.anim.flag or 49
        end

        exports['frkn-uikit']:Progressbar(
            "progressbar-1",
            data.label or "Processing...",
            data.duration or 5000,
            data.useWhileDead or false,
            data.canCancel or true,
            {
                disableMovement = disable.move or false,
                disableCarMovement = disable.car or false,
                disableMouse = disable.mouse or false,
                disableCombat = disable.combat or false,
            },
            anim,
            {},
            {},
            function()
                if data.onFinish then data.onFinish() end
            end,
            function()
                if data.onCancel then data.onCancel() end
            end
        )
        return true
    end

    while progress ~= nil do Wait(0) end
    if not interruptProgress(data) then
        SendNUIMessage({
            action = 'circleProgress',
            data = {
                duration = data.duration,
                position = data.position,
                label = data.label
            }
        })
        return startProgress(data)
    end
end
```

ox\_lib/resource/interface/client/textui.lua

```lua
function lib.showTextUI(text, options)
    if currentText == text then return end

    if not options then options = {} end
    options.text = text
    currentText = text

    local playerPed = PlayerPedId()
    local playerCoords = GetEntityCoords(playerPed)

    local coords = options.coords or playerCoords
    local distance = options.distance or 2.0

    exports['frkn-uikit']:openTextUi({
        title = options.title or '',
        text = text,
        style = options.style or 'default',
        keybind = options.keybind or 'E',
        color = options.color or 'white'
    }, coords, distance)

    isOpen = true
end

function lib.hideTextUI()
    if not isOpen then return end
    exports['frkn-uikit']:closeTextUi()
    isOpen = false
    currentText = nil
end
```

`ox_lib/resource/interface/client/skillcheck.lua`

```lua
function lib.skillCheck(difficulty, inputs)
    if skillcheck then return end

    local result = nil

    exports['frkn-uikit']:StartSkillbar(nil, "Skill Check", function(success)
        result = success
    end)

    while result == nil do
        Wait(0)
    end

    return result
end

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0resmon.org/0resmon/frkn-resources/frkn-ui-kit-system/integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
