Function
#3

Quote:
Originally Posted by SoFahim
Посмотреть сообщение
PHP код:
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))
} 
in OngamemodeInit

use this line


PHP код:
    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;
    } 
in
task SyncUp
put this line

PHP код:
SyncTime(); 
This is only for RP server
where's fixhour(blabla)
Reply


Messages In This Thread
Function - by STONEGOLD - 13.06.2015, 11:52
Re: Function - by SoFahim - 13.06.2015, 16:16
Re: Function - by JaydenJason - 13.06.2015, 16:36

Forum Jump:


Users browsing this thread: 1 Guest(s)