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.
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
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
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.
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?
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
@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!
- 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.
Yeah i havenât changed anything dude but once i get back ill send you my code for how in trying to use it
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