public clock()
{
new TimeString[124];
new day,month,year;
new hour,minute,second;
getdate(year,month,day);
gettime(hour,minute,second);
if (day <= 9)
{
if (month <= 9)
{
if (minute <= 9)
{
if (second <= 9)
{
format(TimeString,256,"~w~0%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~0%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~%d",day,month,year,hour,minute,second);
}
}
else
{
if (second <= 9)
{
format(TimeString,256,"~w~0%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~0%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~%d",day,month,year,hour,minute,second);
}
}
}
else
{
if (minute <= 9)
{
if (second <= 9)
{
format(TimeString,256,"~w~0%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~0%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~%d",day,month,year,hour,minute,second);
}
}
else
{
if (second <= 9)
{
format(TimeString,256,"~w~0%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~0%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~%d",day,month,year,hour,minute,second);
}
}
}
}
else
{
if (month <= 9)
{
if (minute <= 9)
{
if (second <= 9)
{
format(TimeString,256,"~w~%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~%d",day,month,year,hour,minute,second);
}
}
else
{
if (second <= 9)
{
format(TimeString,256,"~w~%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~%d/~r~0%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~%d",day,month,year,hour,minute,second);
}
}
}
else
{
if (minute <= 9)
{
if (second <= 9)
{
format(TimeString,256,"~w~%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~0%d:~r~%d",day,month,year,hour,minute,second);
}
}
else
{
if (second <= 9)
{
format(TimeString,256,"~w~%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~0%d",day,month,year,hour,minute,second);
}
else
{
format(TimeString,256,"~w~%d/~r~%d/~w~%d~n~ ~n~ ~r~%d:~w~%d:~r~%d",day,month,year,hour,minute,second);
}
}
}
}
TextDrawSetString(Clock,TimeString);
return 1;
} |