Need help with clock.
#1

Hi, so my country summer clock time is over, and now its back to normal, how can i get my clock back 2 hours ? Please help

My clock:
(If you need something else to make it, please comment below)

pawn Код:
My gettime
new year,month,day; getdate(year, month, day);
new hour,minuite,second;    gettime(hour,minuite,second);

My textdraw
       txtTimeDisp = TextDrawCreate(550.000000, 21.000000, "00:00");
    TextDrawBackgroundColor(txtTimeDisp, 255);
    TextDrawFont(txtTimeDisp, 3);
    TextDrawLetterSize(txtTimeDisp, 0.569999, 2.299999);
    TextDrawColor(txtTimeDisp, -1);
    TextDrawSetOutline(txtTimeDisp, 1);
    TextDrawSetProportional(txtTimeDisp, 1);


public UpdateTime()
{
    gettime(HOUR, MINUTE);
    format(timestr,32,"%02d:%02d",HOUR,MINUTE);
    TextDrawSetString(txtTimeDisp,timestr);

    //SetWorldTime(HOUR);

    new x=0;
    while(x!=MAX_PLAYERS) {
        if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
            //SetPlayerTime(x,HOUR,MINUTE);
         }
         x++;
    }
}
Reply
#2

Why you don't use gettime() function under UpdateTime() ?

pawn Код:
gettime(hour,minuite,second);
The server knows your location and sets the time automatically to current time.
Reply
#3

I know, but it's still 2 hours ahead, i know my country servers what have that problem fix'd.
Reply
#4

Please help !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)