MSK Scripts
TebexGithubDiscordMusiker15
  • MSK Scripts
    • Welcome
  • Common Issues
    • Keymaster
  • Miscellaneous
    • Change Notifications
  • Scripts
    • MSK Core
      • Installation
      • Functions
        • Client
          • Ace Permission
          • Commands
          • Coords
          • Player
          • Points
          • Request
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
          • Vehicle
        • Shared
          • String
          • Math
          • Table
          • Timeout
          • Vector
        • Server
          • Ace Permission
          • Ban System
          • Commands
          • Player
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
    • MSK Banking
      • Installation
        • Paycheck Transaction
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Server Callbacks
    • MSK EngineToggle
      • Guides
      • Exports
        • Client
      • Event Handler
        • Client
        • Server
    • MSK Fuel
      • Config
      • Exports
        • Client
    • MSK Garage
      • Config
      • Exports
        • Client
    • MSK Handcuffs
      • Guides
        • General Edits for Jobs
        • Jaksam Job Creator
        • Multichar
        • ox_inventory
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Event Handlers
    • MSK Radio
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Server
    • MSK Simcard
      • Installation
        • Config.Database
      • Config
    • MSK VehicleKeys
      • Guides
        • Installation
        • Integrations
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
    • MSK Whitelist
      • Config
      • Exports
        • Client
        • Server
    • MSK Weaponammo
Powered by GitBook
On this page
  • MSK.Progress.Start
  • MSK.Progress.Stop
  • MSK.Progress.Active
  1. Scripts
  2. MSK Core
  3. Functions
  4. Client
  5. UI

Progressbar

MSK.Progress.Start

Shows a progressbar. color is optional and can be set in config.lua.

Parameters duration - number <miliseconds> - The time in miliseconds text - boolean - Text color - string - Color as hex - Optional

MSK.Progress.Start(duration, text, color)

-- Example 1
MSK.Progress.Start(5000, 'Progressing...') -- default color set in config.lua
Wait(5000)

-- Example 2
MSK.Progress.Start(5000, 'Progressing...', "#5eb131") -- custom color
Wait(5000)

-- As an Export:
exports.msk_core:Progressbar(duration, text, color)
Progressbar with specific data

Parameters data - table - Data for Progressbar

Returns progressEnd - boolean - if progress has ended or progress was stopped

Description duration - number <miliseconds> - The time in miliseconds text - boolean - Text color - string - Color as hex - Optional animation - table - Animation data - Optional disable - table - Disable specific actions - Optional

MSK.Progress.Start(data)

-- Example
MSK.Progress.Start({
    duration = 5000,
    text = 'Progressing...',
    color = "#5eb131", -- Optional
    canCancel = true, -- If the Player can cancel the Progressbar
    useWhileDead = false, -- Cancel the Progressbar on player death
    useWhileCuffed = false, -- Cancel the Progressbar if player gets cuffed
    animation = {
        dict = 'timetable@gardener@filling_can',
        anim = 'gar_ig_5_filling_can',
        flags = 49, -- Optional
    },
    disable = {
        move = true, -- Disable Walk
        vehicle = true, -- Disable drive
        combat = true, -- Disable combat
    }
})
print('Progressbar ended or canceled')

-- As an Export:
exports.msk_core:Progressbar(data)

MSK.Progress.Stop

Stops the current ProgressBar.

MSK.Progress.Stop()

-- As an Export:
exports.msk_core:ProgressStop()

MSK.Progress.Active

Checks if the Progressbar is active

Returns isActive - boolean - whether the Progressbar is active

local isActive = MSK.Progress.Active()

-- As an Export:
local isActive = exports.msk_core:ProgressActive()

Last updated 7 months ago