У вас
| Дата: Четверг, 29.12.2011, 02:04 | Сообщение # 1 |
| Ко всем new
new Text:Times; new Text:Date; new Text:lbt; new Text:lbb;
Ко всем new и Forward
new text: textdraw0; forward settime(playerid);
В public OnPlayerConnect(playerid)
TextDrawShowForPlayer(playerid,Text:Date); TextDrawShowForPlayer(playerid,Text:Times); TextDrawShowForPlayer(playerid,Text:Textdraw0);
В public OnGameModeInit()
SetTimer("settime",1000,true); Date = TextDrawCreate(630.000000,420.000000,"--"); TextDrawLetterSize(Date,0.399999,1.600000); TextDrawFont(Date,3); TextDrawUseBox(Date, 0); TextDrawSetShadow(Date,0); TextDrawSetOutline(Date,2); TextDrawBackgroundColor(Date,0x66ff00FF); TextDrawColor(Date,0x000000FF); TextDrawAlignment(Date,3);
SetTimer("settime",1000,true); Times = TextDrawCreate(547.000000,23.000000,"--"); TextDrawLetterSize(Times,0.399999,2.000000); TextDrawFont(Times,3); TextDrawColor(Times,0xffffffff); SetTimer("settime",1000,true);
DisableInteriorEnterExits(); EnableStuntBonusForAll(0); ManualVehicleEngineAndLights(); lbt = TextDrawCreate(-1.000000,2.000000,"---"); lbb = TextDrawCreate(0.000000,337.000000,"---"); TextDrawUseBox(lbt,1); TextDrawBoxColor(lbt,0x000000ff); TextDrawTextSize(lbt,640.000000,-69.000000); TextDrawUseBox(lbb,1); TextDrawBoxColor(lbb,0x000000ff); TextDrawTextSize(lbb,638.000000,-60.000000); TextDrawAlignment(lbt,0); TextDrawAlignment(lbb,0); TextDrawBackgroundColor(lbt,0x000000ff); TextDrawBackgroundColor(lbb,0x000000ff); TextDrawFont(lbt,3); TextDrawLetterSize(lbt,1.000000,12.199999); TextDrawFont(lbb,3); TextDrawLetterSize(lbb,0.899999,15.000000); TextDrawColor(lbt,0x000000ff); TextDrawColor(lbb,0x000000ff); TextDrawSetOutline(lbt,1); TextDrawSetOutline(lbb,1); TextDrawSetProportional(lbt,1); TextDrawSetProportional(lbb,1); TextDrawSetShadow(lbt,1); TextDrawSetShadow(lbb,1);
Далее создаем паблик (вставляем в конец мода)
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); }
|
|
| |