pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

C++ pastebin - collaborative debugging tool View Help


Posted by b00m on Sun 4 Nov 20:13 (modification of post by view diff)
report abuse | View followups from CHYTRAK and Anonymous | download | new post

  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 (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post