Clock system
#10

That's normal and you won't get it any better. Another thing you can do to make sure nothing is skipped is the following:

pawn Код:
public OnGameModeInit()
{
    SetTimer("Time", 1000, false);
    return 1;
}

forward Time();
public Time()
{
    new h, m, s;
    gettime(h, m, s);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(!pInfo[i][clock]) continue;
        new fstr[6];
        format(fstr, sizeof(fstr), "%02i:%02i", h, m);
        PlayerTextDrawSetString(i, clock[i], fstr);
        format(fstr, sizeof(fstr), ":%02i", s);
        PlayerTextDrawSetString(i, clock_sec[i], fstr);
    }
    SetTimer("Time", 1000, false);
    return 1;
}
I would also recommend using y_timers.
Reply


Messages In This Thread
Clock system - by kamiliuxliuxliux - 17.08.2014, 19:22
Re: Clock system - by Juvanii - 17.08.2014, 19:28
Re: Clock system - by kamiliuxliuxliux - 17.08.2014, 19:30
Re: Clock system - by Juvanii - 17.08.2014, 19:40
Re: Clock system - by kamiliuxliuxliux - 17.08.2014, 19:42
Re: Clock system - by Juvanii - 17.08.2014, 19:55
Re: Clock system - by kamiliuxliuxliux - 17.08.2014, 20:04
Re: Clock system - by Juvanii - 17.08.2014, 20:30
Re: Clock system - by kamiliuxliuxliux - 17.08.2014, 20:58
Re: Clock system - by Threshold - 17.08.2014, 22:36

Forum Jump:


Users browsing this thread: 3 Guest(s)