CodeWorks
YoutubeDiscordTebex
  • Welcome!
  • Main
    • How can i download my script
    • How can i transfer my script
    • Whats escrow system?
  • Errors
    • You lack the required entitlement to use cdw-*
  • Scripts
    • Boss Menu
      • Installation
      • Configuration
      • Language Files
      • Events / Export List
      • Editable Files
        • sv_utils.lua
        • cl_utils.lua
        • cl_mugshot.lua
    • Hud System
      • Installation
      • Configuration
      • Language Files
      • Events / Export List
      • Editable Files
        • sv_utils.lua
        • cl_utils.lua
      • Integrations
        • QB Core
          • Notification
          • Progressbar
        • ESX
          • Notification
          • Progressbar
        • ox_lib
          • Notification
          • Progressbar
  • GPS & Bodycam
    • GPS System
      • Installation
      • Configuration
      • Language Files
      • Editable Files
        • sv_utils.lua
        • cl_utils.lua
    • Bodycam System
      • Installation
      • Configuration
      • Language Files
      • Editable Files
        • sv_utils.lua
        • cl_utils.lua
Powered by GitBook
On this page
  • 1. Navigate to ox_lib/resource/interface/client/progressbar.lua
  • 2. Find the lib.progressCircle function and replace it with this:
  • 3. Find the lib.progressBar function and replace it with this:
  • 4. Find the lib.cancelProgress function and replace it with this:
  1. Scripts
  2. Hud System
  3. Integrations
  4. ox_lib

Progressbar

1. Navigate to ox_lib/resource/interface/client/progressbar.lua

2. Find the lib.progressCircle function and replace it with this:

function lib.progressCircle(data)
    while progress do Wait(100) end

    if not interruptProgress(data) then
        progress = data

        exports['cdw-hud']:Progress({
            name = data.label and data.label:lower() or 'progress_circle',
            duration = data.duration,
            label = data.label,
            position = data.position or 'middle',
            useWhileDead = data.useWhileDead,
            canCancel = data.canCancel,
            controlDisables = {}, -- Don't change this
        }, function(cancelled)
            if cancelled then
                progress = false
            else
                progress = nil
            end
        end)

        return startProgress(data)
    else
        return false
    end
end

3. Find the lib.progressBar function and replace it with this:

function lib.progressBar(data)
    while progress do Wait(100) end

    if not interruptProgress(data) then
        progress = data

        exports['cdw-hud']:Progress({
            name = data.label and data.label:lower() or 'progress_circle',
            duration = data.duration,
            label = data.label,
            position = data.position or 'middle',
            useWhileDead = data.useWhileDead,
            canCancel = data.canCancel,
            controlDisables = {}, -- Don't change this
        }, function(cancelled)
            if cancelled then
                progress = false
            else
                progress = nil
            end
        end)

        return startProgress(data)
    else
        return false
    end
end

4. Find the lib.cancelProgress function and replace it with this:

function lib.cancelProgress()
    if not progress then
        error('No progress bar is active')
    end

    progress = false
    exports['cdw-hud']:cancelProgress()
end

PreviousNotificationNextGPS & Bodycam

Last updated 4 months ago

Page cover image