Code causes lagg.
#3

Eugh i cannot ready your code it's too busy, i'm sorry, please use correct identation next time:

Код:
public Worldtime()
{
    if(Minutes < 60)
    {
        Minutes += 1;
        SyncPlayerTime();
    }
    else
    {
        if(Hours < 23)
        {
            Hours += 1;
            Minutes = 0;
            SetWorldTime(Hours);
            SyncPlayerTime();
        } 
        else 
        {
            Hours = 0;
            Minutes = 0;
            SetWorldTime(Hours);
            SyncPlayerTime();
        }
    }
}

public SyncPlayerTime()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
            SetPlayerTime(i,Hours,Minutes);
    }
}
Can you check if the lags begins to show up every 60 seconds?
Reply


Messages In This Thread
Code causes lagg. - by Danny - 15.10.2010, 14:24
Re: Code causes lagg. - by Mike Garber - 15.10.2010, 15:48
Re: Code causes lagg. - by Relixious - 15.10.2010, 16:28
Re: Code causes lagg. - by Danny - 16.10.2010, 08:24
Re: Code causes lagg. - by Danny - 20.10.2010, 11:37
Re: Code causes lagg. - by legodude - 20.10.2010, 11:54
Re: Code causes lagg. - by DeathOnaStick - 20.10.2010, 12:21
Re: Code causes lagg. - by nemesis- - 20.10.2010, 14:36

Forum Jump:


Users browsing this thread: 1 Guest(s)