Function to run on each hour
#3

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.
Reply


Messages In This Thread
Function to run on each hour - by Jonesy96 - 06.06.2016, 09:06
Re: Function to run on each hour - by blackeagle1122 - 06.06.2016, 09:36
Re: Function to run on each hour - by Nin9r - 06.06.2016, 09:53
Re: Function to run on each hour - by Jonesy96 - 06.06.2016, 10:10
Re: Function to run on each hour - by iggy1 - 06.06.2016, 10:22
Re: Function to run on each hour - by Abagail - 06.06.2016, 10:53
Re: Function to run on each hour - by Unte99 - 06.06.2016, 11:11
Re: Function to run on each hour - by Jonesy96 - 06.06.2016, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)