' felipe
Умник
Добрый день. Вырезал из одного RPG мода дату и время. Если такое было,не видел. И так начнем.
К new :
PHP:
new Text:Times;//Дата+Время
new Text:Date;//Дата+Время
PHP:
TextDrawShowForPlayer(playerid,Text:Date);
TextDrawShowForPlayer(playerid,Text:Times);
PHP:
//=================Часы+Дата=================
SetTimer("settime",1000,true);
Date = TextDrawCreate(620.000000,3.000000,"--");
TextDrawLetterSize(Date,0.599999,2.000000);
TextDrawFont(Date,3);
TextDrawUseBox(Date, 0);
TextDrawSetShadow(Date,0);
TextDrawSetOutline(Date,2);
TextDrawBackgroundColor(Date,0xFF8600FF);
TextDrawColor(Date,0x000000FF);
TextDrawAlignment(Date,3);
SetTimer("settime",1000,true);
Times = TextDrawCreate(612.000000,23.000000,"--");
TextDrawLetterSize(Times,0.399999,2.000000);
TextDrawFont(Times,3);
TextDrawUseBox(Times, 0);
TextDrawSetShadow(Times,0);
TextDrawSetOutline(Times,2);
TextDrawAlignment(Times,3);
TextDrawBackgroundColor(Times,0x01FCFFC8);
TextDrawColor(Times,0x000000FF);
SetTimer("settime",1000,true);
PHP:
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, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
TextDrawSetString(Times, string);
}
Вот вам пример,сделайте из него по круче,это идейка )
Скиншот:
Скиншот:
Чтобы видеть скрытое содержание Зарегистрируйтесь на форуме!
