progressBars icon indicating copy to clipboard operation
progressBars copied to clipboard

not issue

Open pashkalt opened this issue 6 years ago • 1 comments

Hey, i wanna ask how to do 4 ways progress bar? i mean, when u picklocking, and it will be 4 steps, i don't wanna do it like 5min, i wanna 5 bars with 1min timing, how can i do it, can explain easiest way to do it?

pashkalt avatar May 23 '19 23:05 pashkalt

Just add Citizen.Wait(ms) between each of them

Example of what i did on Lenzh_chopshop

	    exports['progressBars']:startUI(Config.DoorOpenFrontLeftTime, "Opening Front Left Door")
	    Citizen.Wait(Config.DoorOpenFrontLeftTime)
	SetVehicleDoorOpen(GetVehiclePedIsIn(ped, false), 0, false, false)
	end
	Citizen.Wait(1000)
	if ChoppingInProgress == true then
	    exports['progressBars']:startUI(Config.DoorBrokenFrontLeftTime, "Removing Front Left Door")
	    Citizen.Wait(Config.DoorBrokenFrontLeftTime)
	SetVehicleDoorBroken(GetVehiclePedIsIn(ped, false), 0, true)
	end
	Citizen.Wait(1000)
	if ChoppingInProgress == true then
	    exports['progressBars']:startUI(Config.DoorOpenFrontRightTime, "Opening Front Right Door")
	    Citizen.Wait(Config.DoorOpenFrontRightTime)
	SetVehicleDoorOpen(GetVehiclePedIsIn(ped, false), 1, false, false)
	end
	Citizen.Wait(1000)

1000 - 1 sec

XxFri3ndlyxX avatar May 28 '19 04:05 XxFri3ndlyxX