06.06.2016, 10:10
Quote:
Create a timer that checks once a second (or use an existing one) save current hour to a variable with gettime() then call your function if the hour is changed.
|
Quote:
Something like that?
public SyncTime() { new tmphour; new tmpminute; new tmpsecond; gettime(tmphour, tmpminute, tmpsecond); FixHour(tmphour); tmphour = shifthour; if ((tmphour > ghour) || (tmphour == 0 && ghour == 23)) { ghour = tmphour; if (realtime) { SetWorldTime(tmphour); } } return 1; } And use SyncTime(); to another timer. |
Thanks