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. Some people want it to happen, some wish it would happen, others make it happen.
Castillo Posted November 2, 2013 Posted November 2, 2013 setTimer guiProgressBarGetProgress guiProgressBarSetProgress San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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. Some people want it to happen, some wish it would happen, others make it happen.
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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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. Some people want it to happen, some wish it would happen, others make it happen.
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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Markeloff Posted November 2, 2013 Author Posted November 2, 2013 Well, it's working. Thanks. Some people want it to happen, some wish it would happen, others make it happen.
Castillo Posted November 2, 2013 Posted November 2, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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