06.04.2019, 15:56
1. Declare two variables - one to store the current hour and one to store the current minute.
2. Set a repeating one second timer to increase the current minute. If the current minute reaches 60, set it to 0 and increase the current hour. If the current hour reaches 24, set it to 0.
3. Set a player's time when the spawn or perhaps periodically (once a minute?) to keep players' time in sync.
Note that with TogglePlayerClock enabled, if a player pauses, their clock will pause for the duration they are paused. So perhaps also sync the time when a player unpauses (when no longer paused, detected using OnPlayerUpdate).
Hope this was helpful, unless you are attempting to do something different from this?
2. Set a repeating one second timer to increase the current minute. If the current minute reaches 60, set it to 0 and increase the current hour. If the current hour reaches 24, set it to 0.
3. Set a player's time when the spawn or perhaps periodically (once a minute?) to keep players' time in sync.
Note that with TogglePlayerClock enabled, if a player pauses, their clock will pause for the duration they are paused. So perhaps also sync the time when a player unpauses (when no longer paused, detected using OnPlayerUpdate).
Hope this was helpful, unless you are attempting to do something different from this?