31.05.2013, 20:03
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:
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);
}