[STANDALONE] AN Progress Bar [FREE]

I just woke up yesterday and thought: Why not create my own progress bar?

Features

  • Customizable Color for each progress bar
  • Bar will glow progressively
  • Simple Configuration
  • Simple yet beautiful UI built from scratch using CSS
  • Spam prevention

Video:

Usage:

exports['an_progBar']:run(TIME,TEXT,OPTIONAL_COLOR)

TIME: [Number] Time in seconds
TEXT: [String] Text shown in the progress bar
OPTIONAL_COLOR: [String] Color in HEX format - This is 100% OPTIONAL, not using this argument will make the progress bar use the Config.defaultColor set on the config file.

exports['an_progBar']:stop()

Used to cancel the progress bar.

Example Code:

-- code before the progress bar
exports['an_progBar']:run(10,'Lockpicking','#E14127')
Citizen.Wait(10000)
-- code after the progress bar

Download:

config.lua


Tebex

11 Likes

very good

Thank you good sir :innocent:

good look!

UPDATED TO 1.1.0

  • added cancel feature
  • better smoothness in the progress animation

You can now do:

exports['an_progBar']:stop()

UPDATED TO 1.1.1

Patch Notes:

  • fixed a critical bug concerning the stopping feature

Commit:

exports['an_progBar']:run(10,'Schutzweste wird angelegt','#E14127')

Cant use Exports in Server.lua

[script:esx_ambulance] SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:867: No such export run in resource an_progBar
[script:esx_ambulance] > UseItem (@es_extended/server/functions.lua:247)
[script:esx_ambulance] > handler (@es_extended/server/main.lua:429)
[  script:es_extended] SCRIPT ERROR: error object is not a string

Ofc you can’t. You need to create a client event that redirects to the exports function and then trigger it from the server side using TriggerClientEvent.