14.08.2011, 00:31
pawn Код:
//*************** Inicio do GM ***********
new Text:Reloginho1;
new Text:Reloginho2;
//*************** OnGameModeInit **********
SetTimer("reloginho", 1000, true);
Reloginho1 = TextDrawCreate(etc, etc, etc);
Reloginho2 = TextDrawCreate(etc, etc, etc);
//Aqui algumas informaзхes como useBox, BackgroundColor etc.
//*************** OnPlayerConnect *********
TextDrawShowForPlayer(playerid, Reloginho1);
TextDrawShowForPlayer(playerid, Reloginho2);
//*************** Final do GM ************
public reloginho(playerid)
{
new string[20], year, month, day, hour, minute, second;
getdate(year, month, day);
gettime(hour, minute, second);
format(string, sizeof string, "%d/%d/%d", day, month, year);//Atualize o 2011 quando "chegar" 2012
TextDrawSetString(Reloginho1, string);
format(string, sizeof string, "%d:%d:%d", hour, minute, second);
TextDrawSetString(Reloginho2, string);
return 1;
}