Olha como fico, nгo estб aparecendo as horas e nen data.
Variaveis:
pawn Код:
new Text:Textdraw8;
new Text:Textdraw9;
Texto:
pawn Код:
Textdraw8 = TextDrawCreate(525.000000,5.000000,"--");
Textdraw9 = TextDrawCreate(550.000000,23.000000,"--");
TextDrawAlignment(Textdraw8,0);
TextDrawAlignment(Textdraw9,0);
TextDrawBackgroundColor(Textdraw8,0x000000FF);
TextDrawBackgroundColor(Textdraw9,0x000000FF);
TextDrawFont(Textdraw8,3);//era 2
TextDrawLetterSize(Textdraw8,0.399999,2.000000);
TextDrawFont(Textdraw9,3);//era 2
TextDrawLetterSize(Textdraw9,0.399999,2.000000);
TextDrawColor(Textdraw8,0xFFFFFFFF);
TextDrawColor(Textdraw9,0xFFFFFFFF);
TextDrawSetOutline(Textdraw8,1);
TextDrawSetOutline(Textdraw9,1);
TextDrawSetProportional(Textdraw8,1);
TextDrawSetProportional(Textdraw9,1);
TextDrawSetShadow(Textdraw8,1);
TextDrawSetShadow(Textdraw9,1);
EmOnPlayerConnect:
pawn Код:
TextDrawShowForPlayer(playerid,Textdraw8);
TextDrawShowForPlayer(playerid,Textdraw9);
pawn Код:
public Relogio(playerid)
{
new
string[256],
year,
month,
day,
hour,
minute,
second;
getdate(year, month, day);
gettime(hour, minute, second); // tem como por a fonte da data para 1 ? pra 1?
format(string, sizeof string, "~r~%d/%s%d/2013", day, ((month < 10) ? ("0") : ("")), month);
TextDrawSetString(Textdraw8, string);
TextDrawFont(Textdraw8, 3);
format(string, sizeof string, "%s%d:%s%d:%s%d", (hour < 10) ? ("0") : (""), hour, (minute < 10) ? ("0") : (""), minute, (second < 10) ? ("0") : (""), second);
TextDrawSetString(Textdraw9, string);
TextDrawFont(Textdraw9, 3);
}