bamby12 Posted February 24, 2011 Posted February 24, 2011 setTimer ( func, math.random(12000, 500000), 0) would this work ok to set an infinite timer?
dzek (varez) Posted February 28, 2011 Posted February 28, 2011 i almost sure it will choose one delay time, and it will keep it forever (or until script restarts). if you want make timer and each time it should use new random delay value for next executing - set repeat count to "1" and inside timer put setTimer(func, random_here, 1). like: setTimer(func, math.random(12000, 500000), 1) function func() setTimer(func, math.random(12000, 500000), 1) -- other actions end Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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