Date + Time bugs
#1

I made a date + time stamp thing in the corner of the screen.
But when it turns 22:00 or 23:00 or 0:00

it goes to "0-2:05:23" @ the time.

this is the code:

pawn Код:
public settime(playerid)
{
    new string[256],year,month,day,hours,minutes,seconds;
    getdate(year, month, day), gettime(hours, minutes, seconds);
    format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
    TextDrawSetString(Date, string);
    format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours-2, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
    TextDrawSetString(Time, string);
}
Reply


Messages In This Thread
Date + Time bugs - by Stefand - 31.05.2013, 20:03
Re: Date + Time bugs - by Konstantinos - 31.05.2013, 20:11
Re: Date + Time bugs - by Stefand - 31.05.2013, 20:16
Re: Date + Time bugs - by Konstantinos - 31.05.2013, 20:29

Forum Jump:


Users browsing this thread: 1 Guest(s)