DarkLink Posted July 29, 2011 Share Posted July 29, 2011 Okay guys I am trying to fill a progress bar 0.5 each 900ms, so for 1800ms would fill 1% of the bar right? The problem is that the bar doesnt even fill.. maybe because just work for more than 1% ? Here is my function: function encheBarra(thehouseColShape) fillingHoldBar = setTimer(function(thehouseColShape) if(guiProgressBarGetProgress(holdBar)==100) then sayTextBig() elseif(getElementData(thehouseColShape,"holding",false)==false) then deleteBar() end outputChatBox("hei") guiProgressBarSetProgress (holdBar, guiProgressBarGetProgress(holdBar) + 0.5 ) end, 900, 201, thehouseColShape) end Thanks alot in advance Link to comment
Castillo Posted July 29, 2011 Share Posted July 29, 2011 I think the problem is the + 0.5, use + 1 instead. Link to comment
DarkLink Posted July 29, 2011 Author Share Posted July 29, 2011 I think the problem is the + 0.5, use + 1 instead. yes its working with +1, it says on wiki that can be a float from 0 to 100, I though I could use 0.5 . but seems not Okay I will use 1, thanks castillo Link to comment
Castillo Posted July 29, 2011 Share Posted July 29, 2011 You welcome. P.S: You only need to duplicate the time, and that'll be like 0.5 . Link to comment
DarkLink Posted July 29, 2011 Author Share Posted July 29, 2011 You welcome.P.S: You only need to duplicate the time, and that'll be like 0.5 . Ye true, but what I wanted was to see the bar filling with less difference from each fill, dont know if you understand But nevermind, its okay this way, I will keep 1 Thanks Link to comment
qaisjp Posted July 30, 2011 Share Posted July 30, 2011 I understand...I tried doing this but I couldn't be arsed to finish it. Link to comment
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