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!
- 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.
- 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.
- 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.