SA-MP Forums Archive
Clock update problem? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Clock update problem? (/showthread.php?tid=267095)



Clock update problem? - Outcast - 07.07.2011

I don't know what's wrong with this. The clock is shown right and all, just the time of the day is not updated. It's always night.

pawn Код:
public UpdateClock()
{
    print("Updating clock...");
    gettime(serverhour, serverminute);
    format(timestr,32,"%02d:%02d",serverhour,serverminute);
    TextDrawSetString(RealClock,timestr);
    print("Setting world time...");
    SetWorldTime(serverhour);
    print(timestr);
   
    print("Starting loop through all players...");
    new x=0;
    while(x!=MAX_PLAYERS)
    {
        if(IsPlayerConnected(x))
        {
            SetPlayerTime(x,serverhour,serverminute);
           
            if(serverminute == 01){
                if(pRespectCheck[x] == 1){
                    pInfo[x][pRespect] = pInfo[x][pRespect] + 1;
                    pRespectCheck[x] = 0;
                }
            }
        }
        x++;
   }
}



Re: Clock update problem? - Shadoww5 - 07.07.2011

Use this FS: https://sampforum.blast.hk/showthread.php?tid=70445