Markeloff Posted November 2, 2013 Posted November 2, 2013 Well, I have no code to post, but I wanted to ask about how to guiProgressBarSetProgress with setTimer. I want to make the progress bar increase by the time. For Example : 30 seconds makes 20% of the bar.
Castillo Posted November 2, 2013 Posted November 2, 2013 setTimer guiProgressBarGetProgress guiProgressBarSetProgress
Markeloff Posted November 2, 2013 Author Posted November 2, 2013 local currprog = guiProgressBarGetProgress(progressbar) setTimer ( function() guiProgressBarSetProgress(progressbar,20) end, 30000, 1 ) This made 20% for one time only, means the first only no next increase. How to make it make the progress every 30 secs.
Castillo Posted November 2, 2013 Posted November 2, 2013 Change that "1" to "5", so the timer is executed 5 times instead of just once.
Markeloff Posted November 2, 2013 Author Posted November 2, 2013 local currprog = guiProgressBarGetProgress(progressbar) setTimer ( function() guiProgressBarSetProgress(progressbar,currprog+20) end, 30000, 5 ) Doesn't work.
Castillo Posted November 2, 2013 Posted November 2, 2013 That's because you are only getting the current progress once, move it inside the same function.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now