Qadr_Docs
  • qadr_identity
    • Installation
      • Reboot 2023
      • Old RedemRP
    • Purchasable ambients For Reboot Version
      • Blackwater Saloon
      • Valentine Saloon
      • Valentine Train Station
      • Saint Denis Bazaar
      • Saint Denis Prison
      • Saint Denis Trolley - Soon
  • qadr_fishing
  • qadr_panel
  • qadr_train
    • For Reboot 2023
  • Qadr_Map
  • qadr_ui
    • Ledger System
    • 📒Usable Handheld Catalogue
    • 🐴Legendary Animal Menu
    • 🤠Player Menu UI
    • ⏸️Pause Menu UI
    • ⚒️Crafting Menu UI
    • 🗺️Usable Legendary Animal Maps
    • 🗺️Map Icon
    • ⭕Meters UI
    • 🃏Ability UI
    • 👮‍♀️Wanted UI
    • 💀Death Screen
    • 📃Emote UI / Radial Menu
    • 🛒Shop Info UI
    • 🃏Card Game UI
    • 🤠Bounty Poster
    • 🛂Honor UI
    • 🗒️Challenge Notification Disable
    • 🎖️Mini Leader Board
    • 📋Board Notify
    • ⚔️Score UI
    • 👊Punch Bar
    • 🔄Count Down
    • 🚨Wanted UI - Outdated
    • 🌡️Meters UI - OutDated
    • 👁️‍🗨️Icons UI
    • 🗺️Map UI
      • Mini Map
      • Map Info
      • Hovered Blip Name
    • 🛡️Rank UI
    • 🐟Fish UI
      • 🎣Bait UI
    • ℹ️Info UI
    • 💥Mission Text UI
    • 🔫Weapon Info UI
    • 🐎Horse Info UI
    • 📔Message UI
    • 🤠Prompt Blip For Entities
  • qadr_train_creator - Standalone
Powered by GitBook
On this page
  • Video
  • Creating Meter
  • Update Meter data
  • Create Meter Timer
  • Command Example
  1. qadr_ui

Meters UI - OutDated

You can create multiple circle meters with timer

PreviousWanted UI - OutdatedNextIcons UI

Last updated 1 year ago

You can create 5 meters in same time. All meters run async.

Video

Creating Meter

Creating Meter
local uiData = {
    imgColor =  `COLOR_GREEN`,
    isIconBackgroundVisible = 0,
    meterColor =  `COLOR_GREEN`,
    meterValue =  1.0,
    meterVisible = true,
    overlayColor =  `COLOR_GREEN`,
    overlayTxd = "scoretimer_textures",
    overlayTxn = "SCORETIMER_GENERIC_CROSS",
    overlayVisible =  false,
    secondaryImgColor = `COLOR_PURE_WHITE`,
    secondaryTxd =  "0",
    secondaryTxn = "0",
    showAlternateIcons = 0,
    showBlinkIcon = 0,
    showPulse = 0,
    txd =  "blips",
    txn =  "blip_ambient_train",
    visible = true,
}
local meterData = createMeter(uiData)

Update Meter data

Update Meter data
.
.
.
local meterData = createMeter(uiData)
local uiData = {
    txd =  "hud_textures",
    txn =  "bank_debt",
    showBlinkIcon = 0,
    isIconBackgroundVisible = 0,
    showPulse = 1,
}
meterData:updateMeter(uiData) 

Create Meter Timer

.
.
.
local meterData = createMeter(uiData)
local time = 20 -- 20 second
meterData:SetTimer(time,function(iscomplete)
    print(iscomplete) -- when time is over run this line
end)
Wait(3000)
meterData:timerPause()
Wait(2000)
meterData:timerResume()
Wait(2000)
meterData:timerStop() -- if you use this function before not ending time, isComplete return "false"

Command Example

RegisterCommand("createMeter",function()
    local uiData = {
        imgColor =  `COLOR_GREEN`,
        isIconBackgroundVisible = 0,
        meterColor =  `COLOR_GREEN`,
        meterValue =  1.0,
        meterVisible = true,
        overlayColor =  `COLOR_GREEN`,
        overlayTxd = "scoretimer_textures",
        overlayTxn = "SCORETIMER_GENERIC_CROSS",
        overlayVisible =  false,
        secondaryImgColor = `COLOR_PURE_WHITE`,
        secondaryTxd =  0,
        secondaryTxn = 0,
        showAlternateIcons = 0,
        showBlinkIcon = 0,
        showPulse = 0,
        txd =  "blips",
        txn =  "blip_ambient_train",
        visible = true,
    }
    local meterData = exports["qadr_ui"]:createMeter(uiData)
    local wait = math.random(1000,5000)
    print("wait: "..wait)
    Wait(wait)
    local uiData = {
        txd =  "hud_textures",
        txn =  "bank_debt",
        showBlinkIcon = 0,
        isIconBackgroundVisible = 0,
        showPulse = 0,
    }
    meterData:updateMeter(uiData)
    meterData:SetTimer(20,function(iscomplete)
        print("iscomplete",iscomplete)
        if iscomplete then
            print("timer is complete")
        end
    end)
    wait = math.random(1000,5000)
    print("wait: "..wait)
    Wait(wait)
    print("timer paused")
    meterData:timerPause()
    wait = math.random(1000,5000)
    print("wait: "..wait)
    Wait(wait)
    print("timer resumed")
    meterData:timerResume()
    wait = math.random(1000,5000)
    Wait(wait)
    local luck = math.random(1,2)
    if luck == 1 then
        print("unlucky timer stopped")
        meterData:timerStop()
    end
end)
🌡️