My time clock sometimes jumps a few seconds..
#1

With the clock seconds jumping every 8-10 seconds and dialog taking a while to open, would anyone have any idea why this might be?

pawn Код:
public UpdateTimeAndWeather()
{
        gettime(hour, minute, seconds);
        if(minute == 0) SetWorldTime(hour);
        if (hour > 23)  hour = 0;

        format(timestr,32,"%02d:%02d:%02d", hour, minute, seconds);
        TextDrawSetString(txtTimeDisp,timestr);

        foreach(Player, i)
        {
                if(IsPlayerConnected(i) && LoggedIn[i] == 1)
                {
                        SetPlayerTime(i,hour+2,minute);
                        if(minute == 0 && seconds == 00)
                        {
                            doPayDay(i);
                        }
                }
        }
        return 1;
}

this is a clock.

The only timers are run every minute and are all based on player variables, not on general server.
Reply
#2

Your probably not using the timerfix https://sampforum.blast.hk/showthread.php?tid=289675 so your timers are too slow.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)