13.06.2015, 11:52
I need a function for online time.
60 seconds = 1min
60mins = 1 hour
same as real. anyone help me?
60 seconds = 1min
60mins = 1 hour
same as real. anyone help me?
forward SyncTime();
public SyncTime()
{
new string[64];
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
}
if(!realtime)
{
SetWorldTime(wtime);
gTime = wtime;
}
if (realtime)
{
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
SetWorldTime(tmphour);
gTime = tmphour;
}
if(!realtime)
{
SetWorldTime(wtime);
gTime = wtime;
}
SyncTime();
PHP код:
use this line PHP код:
task SyncUp put this line PHP код:
|