[RELEASE] Progress Bars 1.0 [STANDALONE]

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:

these two lines are the only ones ive added soon as i get home im going to give it a try

1 Like

Example:
exports[‘progressBars’]:startUI(30000, “Reparing”)
where should i put this?

Put this where you want the progress bar to be used. There are example of people’s code above that was working

just a question a side how did you remove you extended HUD ?

      if DoesEntityExist(vehicle) then
        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)
          TriggerEvent("pNotify:SendNotification", {text = "Vehicle has been repaired!", type = "success", timeout = 2000, layout = "centerLeft"})
        end)
      end
    end
  end

Is this all i have to do?

How to like disable if not in action?

@Kato
I am not sure what you mean.

@BrodR
To me that looks like it would work, give it a try!

@Hankaws
I am not sure what you mean but when it hits 100% it stops the displaying of the ui

How did you remove the HUD on the Top Right .

Very nice progress bar. I have use it in lenzh_chopshop.

Edit. Forgot to say thanks! So Thank you for releasing this to us.

1 Like

I do not have one.

Like when you are doing picklocking and cansel but the ui is still there

i know you don’t i want to know how to remove it