20.01.2014, 17:32
hey guys any ideas how i can make a Time Line that it would show me whats the time as Textdraw and as Digital Clock
Thanks for help
Thanks for help
//a_samp.inc must be included.
//TogglePlayerClock is disable by default so don't follow NooB Amirab
static Text:TimeTD;
forward UpdateTime();
public OnGameModeInit()
{
TimeTD = TextDrawCreate(546.0, 23.0, "Loading time ...");
TextDrawLetterSize(TimeTD, 0.5, 1.9);
TextDrawFont(TimeTD, 3);
TextDrawSetOutline(TimeTD, 2);
SetTimer("UpdateTime", 1000, 1);
return 1;
}
public UpdateTime()
{
new Hour, Min, Sec;
gettime(Hour, Min, Sec);
new TimeStr[20];
format(TimeStr, 20, "%02d:%02d", (Hour, Min);
TextDrawSetString(TimeTD, TimeStr);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, TimeTD);
return 1;
}