20.12.2012, 18:29
Quote:
I'm new at pawn and i dont know how to do it because i've never seen something like that
(hours < 10) ? ("0") : ("") What does do "?" in the middle means? |
I made it myself.
pawn Код:
public clock()
{
SyncTime();
new string[256], year, month, day, hours, minutes, seconds;
getdate(year, month, day), gettime(hours, minutes, seconds);
new lhour = 19-hour;
if(lhour) hour += 5;
else day++, hour -= 19;
format(string, sizeof string, "~b~~h~~h~~h~%d/%02d/%d", day, month , year);
TextDrawSetString(clock1, string);
format(string, sizeof string, "~b~~h~~h~~h~%02d:%02d:%02d", hours, minutes, seconds);
TextDrawSetString(clock2, string);
TextDrawShowForAll(clock1);TextDrawShowForAll(clock2);
}