Advertisement
Guest User

Untitled

a guest
Apr 13th, 2015
2,689
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. /*
  2. Clock & Date System
  3. Made by: ZaBraNjeNi
  4. ///////////////////
  5. ///// ///////
  6. ///////
  7. ///////
  8. ////////
  9. ////////
  10. //////// //////
  11. ///////////////////
  12. */
  13.  
  14.  
  15. #include <a_samp>
  16. #define FILTERSCRIPT
  17.  
  18. new Text:Date;
  19. new Text:Line1;
  20. new Text:Line2;
  21. new Text:Time;
  22.  
  23.  
  24. public OnFilterScriptInit()
  25. {
  26. print("\n---------------------------------------");
  27. print(" Anti - Spawn Kill ");
  28. print(" Made by: ZaBraNjeNi ");
  29. print(" L O A D E D ");
  30. print("---------------------------------------\n");
  31.  
  32. Date = TextDrawCreate(45.000000, 326.000000, "06/04/2015");
  33. TextDrawBackgroundColor(Date, 255);
  34. TextDrawFont(Date, 3);
  35. TextDrawLetterSize(Date, 0.509999, 1.000000);
  36. TextDrawColor(Date, -1);
  37. TextDrawSetOutline(Date, 0);
  38. TextDrawSetProportional(Date, 1);
  39. TextDrawSetShadow(Date, 1);
  40.  
  41. Line1 = TextDrawCreate(36.000000, 332.000000, "-");
  42. TextDrawBackgroundColor(Line1, 255);
  43. TextDrawFont(Line1, 1);
  44. TextDrawLetterSize(Line1, 6.699995, 1.000000);
  45. TextDrawColor(Line1, 16711935);
  46. TextDrawSetOutline(Line1, 0);
  47. TextDrawSetProportional(Line1, 1);
  48. TextDrawSetShadow(Line1, 1);
  49.  
  50. Line2 = TextDrawCreate(36.000000, 318.000000, "-");
  51. TextDrawBackgroundColor(Line2, 255);
  52. TextDrawFont(Line2, 1);
  53. TextDrawLetterSize(Line2, 6.699995, 1.000000);
  54. TextDrawColor(Line2, 16711935);
  55. TextDrawSetOutline(Line2, 0);
  56. TextDrawSetProportional(Line2, 1);
  57. TextDrawSetShadow(Line2, 1);
  58.  
  59. Time = TextDrawCreate(49.000000, 311.000000, "00:00:00");
  60. TextDrawBackgroundColor(Time, 255);
  61. TextDrawFont(Time, 1);
  62. TextDrawLetterSize(Time, 0.500000, 1.000000);
  63. TextDrawColor(Time, -1);
  64. TextDrawSetOutline(Time, 0);
  65. TextDrawSetProportional(Time, 1);
  66. TextDrawSetShadow(Time, 1);
  67.  
  68. SetTimer("time", 1000, true);
  69. return 1;
  70. }
  71.  
  72. public OnFilterScriptExit()
  73. {
  74. print("\n---------------------------------------");
  75. print(" Anti - Spawn Kill ");
  76. print(" Made by: ZaBraNjeNi ");
  77. print(" U N - L O A D E D ");
  78. print("---------------------------------------\n");
  79.  
  80. return 1;
  81. }
  82.  
  83. public OnPlayerSpawn(playerid)
  84. {
  85. TextDrawShowForPlayer(playerid, Date);
  86. TextDrawShowForPlayer(playerid, Line1);
  87. TextDrawShowForPlayer(playerid, Line2);
  88. TextDrawShowForPlayer(playerid, Time);
  89. }
  90.  
  91. public OnPlayerDisconnect(playerid, reason)
  92. {
  93. TextDrawHideForPlayer(playerid, Date);
  94. TextDrawHideForPlayer(playerid, Line1);
  95. TextDrawHideForPlayer(playerid, Line2);
  96. TextDrawHideForPlayer(playerid, Time);
  97. }
  98.  
  99. forward time();
  100. public time()
  101. {
  102. new string[256], year, month, day, hours, minutes, seconds;
  103. getdate(year, month, day), gettime(hours, minutes, seconds);
  104. format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
  105. TextDrawSetString(Date, string);
  106. format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  107. TextDrawSetString(Time, string);
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement