Advertisement
Guest User

Untitled

a guest
Sep 11th, 2011
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.24 KB | None | 0 0
  1. new Text:Uhrzeit, Text:Date;
  2.  
  3. forward UpdateTime(playerid);
  4.  
  5. public OnFilterScriptInit()
  6. {
  7.         SetTimer("UpdateTime",1000,true);
  8.         Date = TextDrawCreate(547.000000,11.000000,"01.01.2011");
  9.         TextDrawFont(Date,3);
  10.         TextDrawLetterSize(Date,0.399999,1.600000);
  11.         TextDrawColor(Date,0xffffffff);
  12.         Uhrzeit= TextDrawCreate(547.000000,28.000000,"00:00:00");
  13.         TextDrawFont(Uhrzeit,3);
  14.         TextDrawLetterSize(Uhrzeit,0.399999,1.600000);
  15.         TextDrawColor(Uhrzeit,0xffffffff);
  16.         return 1;
  17. }
  18.  
  19. public OnPlayerSpawn(playerid)
  20. {
  21.         TextDrawShowForPlayer(playerid, Uhrzeit), TextDrawShowForPlayer(playerid, Date);
  22.         return 1;
  23. }
  24.  
  25. public UpdateTime(playerid)
  26. {
  27.         new string[256],year,month,day,hours,minutes,seconds;
  28.         getdate(year, month, day), gettime(hours, minutes, seconds);
  29.         format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
  30.         TextDrawSetString(Date, string);
  31.         format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  32.         TextDrawSetString(Uhrzeit, string);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement