Game time
#5

Hmm I got ya idea. Here you go

Код:
public settime(playerid)
{
        new string[256],year,month,day,hours,minutes,seconds;
        getdate(year, month, day), gettime(hours, minutes, seconds);
        format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
        TextDrawSetString(Date, string);
        format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
        TextDrawSetString(Time, string);
}
Код:
new Text:Time, Text:Date;
 
forward settime(playerid);
Код:
//game mode init
SetTimer("settime",1000,true);
Also make sure you just add it to the textdraw
Код:
new Text:Time, Text:Date;
Код:
//GameModeInit
Date = TextDrawCreate(547.000000,11.000000,"--");
 
        TextDrawFont(Date,3);
        TextDrawLetterSize(Date,0.399999,1.600000);
    TextDrawColor(Date,0xffffffff);
 
        Time = TextDrawCreate(547.000000,28.000000,"--");
 
        TextDrawFont(Time,3);
        TextDrawLetterSize(Time,0.399999,1.600000);
        TextDrawColor(Time,0xffffffff);
Reply


Messages In This Thread
Game time - by MichaelWharton101 - 08.04.2013, 23:25
Re: Game time - by Pawnie - 08.04.2013, 23:31
Re: Game time - by MichaelWharton101 - 08.04.2013, 23:38
Re: Game time - by MichaelWharton101 - 09.04.2013, 00:00
Re: Game time - by Pawnie - 09.04.2013, 02:24
Re: Game time - by MichaelWharton101 - 10.04.2013, 09:54

Forum Jump:


Users browsing this thread: 1 Guest(s)