Tessék:
Script:
#include <a_samp>
new Text:TimeDate;
new timedate, str[68];
public OnFilterScriptInit()
{
TimeDate = TextDrawCreate(586.000000, 27.000000, \"_\");
TextDrawAlignment(TimeDate, 2);
TextDrawBackgroundColor(TimeDate, 255);
TextDrawFont(TimeDate, 1);
TextDrawLetterSize(TimeDate, 0.420000, 0.899999);
TextDrawColor(TimeDate, -1);
TextDrawSetOutline(TimeDate, 1);
TextDrawSetProportional(TimeDate, 1);
timedate = SetTimer(\"TimeAndDate\", 1000, true);
return 1;
}
forward TimeAndDate();
public TimeAndDate()
{
new year,month,day,hours,minutes,seconds;
getdate(year, month, day), gettime(hours, minutes, seconds);
format(str, sizeof str, \"~r~~h~%02d:%02d:%02d~n~~n~~b~~h~~h~%d/%02d/%02d\", hours, minutes, seconds, year, month, day);
TextDrawSetString(TimeDate, str);
}
public OnFilterScriptExit()
{
TextDrawHideForAll(TimeDate);
TextDrawDestroy(TimeDate);
KillTimer(timedate);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, TimeDate);
return 1;
}
Kép: