17.01.2015, 05:31
yes, it is possible.
On top:
OnGameModeInit:
On top:
PHP код:
new THrs;
new Tmin;
new Text:Time;
PHP код:
SetTimer("TimeU", 30000, true);
Time = TextDrawCreate(578.000000, 14.000000, "00:00");
TextDrawAlignment(Time, 2);
TextDrawFont(Time, 3);
TextDrawLetterSize(Time, 0.609999, 3.299998);
TextDrawColor(Time, -1);
TextDrawSetOutline(Time, 1);
TextDrawSetProportional(Time, 0);
TextDrawSetSelectable(Time, 0);
PHP код:
forward TimeU();
public TimeU()
{
new string[7], second;
gettime(THrs, Tmin, second);
if(THrs>10)
{
if(Tmin<10)
{
format(string,sizeof(string),"%d:0%d",THrs,Tmin;
}
if(Tmin>9)
{
format(string,sizeof(string),"%d:%d",THrs,Tmin);
}
}
if(THrs<10)
{
if(Tmin<10)
{
format(string,sizeof(string),"0%d:0%d",THrs,Tmin);
}
if(Tmin>9)
{
format(string,sizeof(string),"0%d:%d",THrs,Tmin);
}
}
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerTime(i,THrs,Tmin);
}
}
TextDrawSetString(Time,string);
}