Function
#2

PHP код:
forward SyncTime();
public 
SyncTime()
{
    new 
string[64];
    new 
tmphour;
    new 
tmpminute;
    new 
tmpsecond;
    
gettime(tmphourtmpminutetmpsecond);
    
FixHour(tmphour);
    
tmphour shifthour;
    if ((
tmphour ghour) || (tmphour == && ghour == 23))


in OngamemodeInit

use this line


PHP код:
    if(!realtime)
    {
        
SetWorldTime(wtime);
        
gTime wtime;
    }

    if (
realtime)
    {
        new 
tmphour;
        new 
tmpminute;
        new 
tmpsecond;
        
gettime(tmphourtmpminutetmpsecond);
        
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
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)