[RELEASE] Progress Bars 1.0 [STANDALONE]

Amazing Job! Super easy to use

if DoesEntityExist(vehicle) then
			isBusy = true
			TaskStartScenarioInPlace(playerPed, 'PROP_HUMAN_BUM_BIN', 0, true)
			Citizen.CreateThread(function()
				exports['progressBars']:startUI(20000, "Reparing")
				Citizen.Wait(20000)
				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

You need the Citizen.Wait(20000) the export does not act as a function time.

2 Likes

still dont work though already tried it that way dude the progress bar dont show.

it’s kind of abit broken it does nothing but spam your console with callbacks
every second.

Hmm… dumb question but you put in the config start progressBars
and or start progessBars in console prior to using?

yea dude haha

@Chase_Goins example is working just fine!
Added to Hijacking, Repairing and Cleaning. Everything is just great! <3

1 Like

mind sharing how you got yours working for mechanic?

The same way he gave the example, just add the code for progressBars right before Citizen.Wait in your client/main.lua

		if DoesEntityExist(vehicle) then
			isBusy = true
			TaskStartScenarioInPlace(playerPed, 'WORLD_HUMAN_WELDING', 0, true)
			Citizen.CreateThread(function()
				exports['progressBars']:startUI(10000, "Hijacking...") -- This is the part you add
				Citizen.Wait(10000) -- Right before this <---------

				SetVehicleDoorsLocked(vehicle, 1)
				SetVehicleDoorsLockedForAllPlayers(vehicle, false)
				ClearPedTasksImmediately(playerPed)

				ESX.ShowNotification(_U('vehicle_unlocked'))
				isBusy = false
			end)
		else
			ESX.ShowNotification(_U('no_vehicle_nearby'))
		end
2 Likes

Try to restart your server and double-check if all the resources are running as needed.

Is the text support utf-8 ??

where to put this ? can you teach me @Chase_Goins be specific please im new to this. :slight_smile:

exports[‘progressBars’]:startUI(time, “text”)
Citizen.Wait(time)

The time is in ms(so if you put 2000 it’s 2 sec) you can put anything you want. You replace text with something like “repairing…” or “smoking…”

You should add a callback after the progressBar is finished, also maybe some way to cancel the action?

3 Likes

Hello, Can we use it on the server side?
Thx in advance

@Ton_GameMua like any other resource. This is not a tutorial on how to add resources!

@OutSkilledYa_Gaming Go to the top it has an image of the script and an example bit of code on how to use!

@Yozza not sure what you mean but if you have changed the name of the resource or anything you will need to change how you use the export!

@OutSkilledYa_Gaming YOu add the resource, it makes an export and you can use it in any other resource using the example I gave.

@Yozza You need a citizen.wait for the time you do it, in your case Citizen.Wait(30000)

Send me a full DM of your code. First of all make sure you did not change the resource name and if you did you will have to change a line in the exports.

@xVelns I am Glad it is working well for you :slight_smile:

@KASH as I have said above I made this to how I needed it and thought it would be useful to some. You can easily add that yourself or just have a citizen wait of the same time and then after that it will be complete

@desperadisse it does not make a server export or support server side putting it on everyone’s screen but that would not be that hard to add just look it up on the forums!

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.

Yeah i haven’t changed anything dude but once i get back ill send you my code for how in trying to use it

@Yozza Ok sounds good!

hopefully this is correct

To me that looks like it should work fine as long as you have not edited the name of the progress bar resource or any function names within the resource then you should be good to go :slight_smile: