0xNull Posted January 27, 2018 Share Posted January 27, 2018 How to create simple timer? For example, after which will spawned the car? Link to comment Share on other sites More sharing options...
JackRabbott Posted April 6, 2018 Share Posted April 6, 2018 The first response to this thread shows how to create a simple timer. 1 Link to comment Share on other sites More sharing options...
Chris0x Posted May 19, 2018 Share Posted May 19, 2018 If you want to create a timer lets say which spawns a vehicle after 3 seconds this is the way to go. setTimeout(() => { //spawn vehicle here }, 3000); Link to comment Share on other sites More sharing options...
LeozinH1 Posted May 19, 2018 Share Posted May 19, 2018 (edited) let myTimer = null; myTimer = setInterval(() => { // Spawn Vehicle clearInterval(myTimer); myTimer = null; }, 3000); This should work, after 3 seconds, it performs the function and clears the range (runs only once) Edited May 21, 2018 by LeozinH1 Link to comment Share on other sites More sharing options...
Chris0x Posted May 21, 2018 Share Posted May 21, 2018 Am 19.5.2018 um 22:10 schrieb LeozinH1: let myTimer = null; myTimer = setInterval(() => { // Spawn Vehicle clearInterval(myTimer); myTimer = null; }, 3000); This should work, after 3 seconds, it performs the function and clears the range (runs only once) No need for an interval, just use the timeout function Link to comment Share on other sites More sharing options...
LeozinH1 Posted May 21, 2018 Share Posted May 21, 2018 5 hours ago, Chris0x said: No need for an interval, just use the timeout function It is true. I thought the settimeout was looping. I've never tried to use it Link to comment Share on other sites More sharing options...
LT.Steiner Posted March 26, 2020 Share Posted March 26, 2020 I want timer that going synced with region (24 hours) i want plugin or script something like that, can you guys please send anything like it? 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