gtasearcher Posted April 6, 2009 Share Posted April 6, 2009 I was making a CLEO with a timer. I know [email protected] and [email protected] are timers, but {$CLEO .cs}thread 'TIMER'jump @1:1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @1ifPlayer.Conntrolable($PLAYER_CHAR)jf @1if$ONMISSION == 0jf @[email protected] = 0repeatwait 0until [email protected] == 5000// yada yada yada doesn't work. The only thingy I managed to get working is this: {$CLEO .cs}thread 'TIMER'jump @1:1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @1ifPlayer.Controllable($PLAYER_CHAR)jf @1if$ONMISSION == 0jf @[email protected] = 0repeatwait 1000 // 1 [email protected] += 1000 // 1 secondwait 0until [email protected] == 5000 (5 seconds)// yada yada yada But why? It would be hard to have a thread with only looping vars, not actual timers. Link to comment Share on other sites More sharing options...
PatrickW Posted April 6, 2009 Share Posted April 6, 2009 You should use : repeatwait 0until [email protected] > 5000 The changes that the timer ([email protected]) is exactly 5000 at the moment you execute that opcode is small. In your second solution this does work, because [email protected] will be 5000 for a whole second. If you would have initialize [email protected] to 1 i.s.o. 0, that solution wouldn't also have worked, bacause the value would never be 5000. Link to comment Share on other sites More sharing options...
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