Recent Posts
Erlang | 6 sec ago
Ruby | 9 sec ago
None | 32 sec ago
None | 44 sec ago
None | 44 sec ago
None | 46 sec ago
Ruby | 51 sec ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By CHYTRAK on the 10th of Nov 2007 08:42:00 PM Download | Raw | Embed | Report
  1. // ON BEGINNING CODE
  2.  
  3. forward time();
  4.  
  5.  
  6. // TO public OnPlayerSpawn(playerid)
  7.  
  8. time();
  9.  
  10.  
  11. // ANYWHERE
  12.  
  13. public time()
  14. {
  15. new Text:Clock;
  16. new hour,minute,second;
  17. gettime(hour,minute,second);
  18. new string[256];
  19. new string2[256];
  20. if (minute <= 9){format(string,25,"%d:0%d",hour,minute);}
  21. else {format(string,25,"%d:%d",hour,minute);}
  22. TextDrawHideForAll(Clock);
  23. Clock=TextDrawCreate(549,24,string);
  24. TextDrawLetterSize(Clock,0.55,2);
  25. TextDrawFont(Clock,3);
  26. TextDrawBackgroundColor(Clock,0x000000AA);
  27. TextDrawSetOutline(Clock,2);
  28. TextDrawShowForAll(Clock);
  29. SetTimer("time",30000,0);
  30. if (hour == 0){SetWorldTime(0);}
  31. if (hour == 1){SetWorldTime(1);}
  32. if (hour == 2){SetWorldTime(2);}
  33. if (hour == 3){SetWorldTime(3);}
  34. if (hour == 4){SetWorldTime(4);}
  35. if (hour == 5){SetWorldTime(5);}
  36. if (hour == 6){SetWorldTime(6);}
  37. if (hour == 7){SetWorldTime(7);}
  38. if (hour == 8){SetWorldTime(8);}
  39. if (hour == 9){SetWorldTime(9);}
  40. if (hour == 10){SetWorldTime(10);}
  41. if (hour == 11){SetWorldTime(11);}
  42. if (hour == 12){SetWorldTime(12);}
  43. if (hour == 13){SetWorldTime(13);}
  44. if (hour == 14){SetWorldTime(14);}
  45. if (hour == 15){SetWorldTime(15);}
  46. if (hour == 16){SetWorldTime(16);}
  47. if (hour == 17){SetWorldTime(17);}
  48. if (hour == 18){SetWorldTime(18);}
  49. if (hour == 19){SetWorldTime(19);}
  50. if (hour == 20){SetWorldTime(20);}
  51. if (hour == 21){SetWorldTime(21);}
  52. if (hour == 22){SetWorldTime(22);}
  53. if (hour == 23){SetWorldTime(23);}
  54. if (hour == 24){SetWorldTime(24);}
  55.  
  56. new Text:Datum;
  57. new day,month,year;
  58. getdate(day,month,year);
  59. if (day <= 9){format(string2,25,"0%d.%d.%d",year,month,day);}
  60. else if (month <= 9 && day >= 9) {format(string2,25,"%d.0%d.%d",year,month,day);}
  61. else {format(string2,25,"%d.%d.%d",year,month,day);}
  62. TextDrawHideForAll(Datum);
  63. Datum=TextDrawCreate(500,3,string2);
  64. TextDrawLetterSize(Datum,0.55,2);
  65. TextDrawFont(Datum,3);
  66. TextDrawBackgroundColor(Datum,0x000000AA);
  67. TextDrawSetOutline(Datum,2);
  68. TextDrawShowForAll(Datum);
  69.  
  70. return 1;
  71. }
  72.  
  73.  
  74. // CREATE BY b00m
Submit a correction or amendment below. [ previous version ] | [ difference ] | Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: