Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Text:Uhrzeit, Text:Date;
- forward UpdateTime(playerid);
- public OnFilterScriptInit()
- {
- SetTimer("UpdateTime",1000,true);
- Date = TextDrawCreate(547.000000,11.000000,"01.01.2011");
- TextDrawFont(Date,3);
- TextDrawLetterSize(Date,0.399999,1.600000);
- TextDrawColor(Date,0xffffffff);
- Uhrzeit= TextDrawCreate(547.000000,28.000000,"00:00:00");
- TextDrawFont(Uhrzeit,3);
- TextDrawLetterSize(Uhrzeit,0.399999,1.600000);
- TextDrawColor(Uhrzeit,0xffffffff);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Uhrzeit), TextDrawShowForPlayer(playerid, Date);
- return 1;
- }
- public UpdateTime(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(Uhrzeit, string);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement