16.08.2010, 15:46
Okay, here'e my code (I use SetTimer in OnGameModeInit wich repeats every second)
The problem is, the TextDraw flashes... it shows the correct time and date but it disapears and appears all the time with 1 second in between..
pawn Код:
new string[128];
TextDrawDestroy(DateAndTime);
format(string, sizeof(string), "%02d/%02d/%02d-%02d:%02d~n~", xDay, xMonth, xYear, xHour, xMinute);
DateAndTime = TextDrawCreate(498.000000, 2.000000, string);
TextDrawBackgroundColor(DateAndTime, 255);
TextDrawFont(DateAndTime, 1);
TextDrawLetterSize(DateAndTime, 0.360000, 2.200000);
TextDrawColor(DateAndTime, -1);
TextDrawSetOutline(DateAndTime, 1);
TextDrawSetProportional(DateAndTime, 1);
TextDrawShowForAll(DateAndTime);