golanu21 Posted July 29, 2013 Share Posted July 29, 2013 function greetingHandler ( ) Reached100 = 0 guiProgressBarSetProgress ( progressBar, ( guiProgressBarGetProgress ( progressBar ) + 50 ) ) local mu = guiProgressBarGetProgress (progressBar) if mu >= 100 then guiProgressBarSetProgress(progressBar, 0) print(Reached100 +1) end if Reached100 == 2 then guiSetText(nivlab, "2") end if Reached100 == 3 then guiSetText(nivlab, "3") end end addEvent ( "gret", true ) addEventHandler ( "gret", getRootElement(), greetingHandler ) i want when progressBar has reached 2 times 100% then guiSetText(nivlab, "text") is don't work Link to comment
Wei Posted July 29, 2013 Share Posted July 29, 2013 local progCount = 0 function greetingHandler ( ) guiProgressBarSetProgress ( progressBar, ( guiProgressBarGetProgress ( progressBar ) + 50 ) ) local mu = guiProgressBarGetProgress (progressBar) if mu >= 100 then guiProgressBarSetProgress(progressBar, 0) progCount = progCount+1 end if progCount == 1 then -- if progress count is 1 guiSetText(nivlab, "1") elseif progCount == 2 then guiSetText(nivlab, "2") -- if progress count is 2 end end addEvent ( "gret", true ) addEventHandler ( "gret", getRootElement(), greetingHandler ) Try this Link to comment
golanu21 Posted July 29, 2013 Author Share Posted July 29, 2013 this it is , thanx man , thanx 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