[RELEASE] Progress Bars 1.0 [STANDALONE]

Hello.

I spent some time trying different ways of doing this and ended up making a basic NUI that adds progress bars that you can add for when using something in your inventory script for example, basically however you want.

This is really basic and in the __reosurce.lua I export the function to start the progress bar with time in MS and the text you want it to display. Example will be below. This is simple to use and because I use export you can add it into any resource you want.

exports['progressBars']:startUI(Time_MS, "Text Display")

Example:
exports['progressBars']:startUI(30000, "Reparing")
This will display and progress over 30 seconds / 30000ms and show Repaiing as the text

This does not need to be in a loop or anything you just need to call it as done above and send it the 2 arguments as shown in the example above.

Feel free to edit this, change colors or whatever you want just do NOT claim it is yours!
If you need any help please post below or direct message me on the forums and I will try my best to help you BUT if you make any changes to the resource then I will not help.

Enjoy the resource and I hope it is useful.

Download: Release Progress Bars 1.0 [STANDALONE] · EthanPeacock/progressBars · GitHub

Documentation
This isn’t really “documentation” but it is to help some of you out there!

  1. If you want to change the color of the bar or font then do that through the CSS and you can find that easy enough.
  2. If you want it to fully display then currently you have to do the export line in your desired resource and after add a citizen.wait for the same amount of time. This might be changed in an upcoming update but I do not have many further plans for this resource just thought it had a place to be released.
  3. As I said modifying the code itself is fine but I am not willing to help fix it if you break it from there!

Just hope this works for all you guys and I can help you get what you want done, done. Sorry for late reply’s I had school and went to bed after releasing. Thanks for the support guys and I am glad so many of you like it.

IMPORTANT
I am no longer providing support for this and I am sure most will not like this but I have a lot I do myself and do not really have the time to provide support. If you need help leave a comment I might see it but if not someone else might help you. This is quite a simple script so as long as you have not renamed the resource or anything then most likely it will be a issue of how you are using it or where you are using it.
Thanks.

35 Likes

any photos?

1 Like

pics would be nice to see

1 Like

Got a picture for you guys for the example I added

Maybe a callback when the progressbar is finished would be nice, also please either upload your files to github or directly to the forums

2 Likes

@TheIndra could make this but I made it just stop displaying when complete because thats all I needed for what I made it for. Might add this tomorrow when I wake up and finish school. Will post update here if I do.

github ?

Will get it added now so you can view source code and get from there!

Upload all files to either Github or the forum please. 3rd party upload sites should be reserved if the filesize is larger than the forum and Github allowed filesize, which this clearly is not

Will do in future just wanted to go off to bed so quickly uploaded but im doing that now.

1 Like

UPDATED
Added github link!

Take your time with releases. Next time also read over the rules again just to be sure you’re on the right page. There’s no reason to hurry! Make something good, create a good post and everything.

You probably already have the “make something good” part done :slight_smile:

2 Likes

how to add bro

can we get an example of it being used in a script

using it how it should be used at not got it working yet no errors or anything i was using t0sic_loadingbar

before this which worked fine and works just the same way as this

There’s an example in the post

i see that do i just put it in resource folders and thats it? i dont understand the example it just shows a single line of its call

me to help pls

doing the excample just crashed my game trying to get help and saying theres an example in post doesnt help much at all

it should be something like this for the mechanic but it doesnt show the progressbar

		if DoesEntityExist(vehicle) then
			isBusy = true
			TaskStartScenarioInPlace(playerPed, 'PROP_HUMAN_BUM_BIN', 0, true)
			Citizen.CreateThread(function()
                exports['progressBars']:startUI(30000, "Reparing")

				SetVehicleFixed(vehicle)
				SetVehicleDeformationFixed(vehicle)
				SetVehicleUndriveable(vehicle, false)
				SetVehicleEngineOn(vehicle, true, true)
				ClearPedTasksImmediately(playerPed)

				ESX.ShowNotification(_U('vehicle_repaired'))
				isBusy = false
			end)
		else
			ESX.ShowNotification(_U('no_vehicle_nearby'))
		end
1 Like