Building timer like in Clash of Clans?

Posted by RiverIsRising
How would I go about setting up a building timer on the server like in Clash of Clans where even if the game is closed the timer is still counting down?

Replies (2)

Last message on 7 Dec 2016

Size43 (Administrator) on 17 Nov 2016, 16:12:48
You can use gms_time() to get the number of seconds since some date. When the player logs back in, you can use that value to calculate the number of seconds the game was closed, and then update the timers accordingly.
RiverIsRising (Topicstarter) on 7 Dec 2016, 16:16:00
Got it working, that was pretty easy, thanks!