Advertisement
Guest User

Untitled

a guest
Mar 16th, 2014
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.21 KB | None | 0 0
  1. /*
  2. Random server poruke sat i datum by mark
  3. */
  4. #include <a_samp>
  5.  
  6. //---------------------------------------------------------------------------------------
  7. new Text:Textdraw0;
  8. new Text:Textdraw1;
  9. new Text:Textdraw2;
  10. new Text:Textdraw3;
  11. new Text:Textdraw4;
  12. new Text:Textdraw5;
  13. new Text:Textdraw6;
  14. new Text:Textdraw7;
  15. new Text:Textdraw8;
  16. new Text:Sat0;
  17. new Text:datum;
  18.  
  19. //---------------------------------------------------------------------------------------
  20. forward RandomMessage();
  21. forward Sat(playerid);
  22. forward setdatum(playerid);
  23. //---------------------------------------------------------------------------------------
  24. new RandomMessages[][] =
  25. {
  26. "~y~Server poruke: ~w~Posjetite nas forum ~r~www.uskoro.com ~w~i registrujte se.",
  27. "~y~Server poruke: ~w~Ukoliko primjetite citera ili bug prijavite ga na ~r~/report.",
  28. "~y~Server poruke: ~w~Ukoliko ste novi igrac i ako vam treba pomoc ~r~/new ~w~ili ~r~/askq.",
  29. "~y~Server poruke: ~w~Ukoliko ne poznajte dobro Los Santos kucajte ~r~/gps.",
  30. "~y~Server poruke: ~w~Za ulazak u organizaciju potreban je level ~r~3.",
  31. "~y~Server poruke: ~w~Sve komande mozete pronaci na ~r~/komande.",
  32. "~y~Server poruke: ~w~Trenutna verzija moda ~r~v1.0 by Mark.",
  33. "~y~Server poruke: ~w~Forum:~r~www.uskoro.com",
  34. "~y~Server poruke: ~w~Da pricate sa gradjanima Los Santosa ~r~/teamspeak.",
  35. "~y~Server poruke: ~w~Reklamiranje strogo ~r~kaznjavamo",
  36. "~y~Server poruke: ~w~Ako zelite level 3 i 50.000$ potrazite ih na ~r~forumu",
  37. "~y~Server poruke: ~w~Dobrodosli na ~r~Mark Script ~w~roleplay server",
  38. "~y~Server poruke: ~w~Da vidite litnu online lidera kucajte ~r~/lideri",
  39. "~y~Server poruke: ~w~Da vidite listu online helpera kucajte ~r~helperi"
  40. };
  41. public OnPlayerSpawn(playerid)
  42. {
  43. TextDrawShowForPlayer(playerid, Textdraw0);
  44. TextDrawShowForPlayer(playerid, Textdraw1);
  45. TextDrawShowForPlayer(playerid, Textdraw2);
  46. TextDrawShowForPlayer(playerid, Textdraw3);
  47. TextDrawShowForPlayer(playerid, Textdraw4);
  48. TextDrawShowForPlayer(playerid, Textdraw5);
  49. TextDrawShowForPlayer(playerid, Textdraw6);
  50. TextDrawShowForPlayer(playerid, Textdraw7);
  51. TextDrawShowForPlayer(playerid, Textdraw8);
  52. TextDrawShowForPlayer(playerid, Sat0);
  53. TextDrawShowForPlayer(playerid, datum);
  54. return 1;
  55.  
  56. }
  57. public OnGameModeInit()
  58. {
  59. SetTimer("RandomMessage", 6000, true);
  60. SetTimer("Sat",1000,true);
  61. SetTimer("setdatum",1000, 1);
  62. //------------------------------------------Textdravovi----------------------------------
  63. Textdraw0 = TextDrawCreate(641.199951, 435.313323, "usebox");
  64. TextDrawLetterSize(Textdraw0, 0.000000, 1.176666);
  65. TextDrawTextSize(Textdraw0, -2.000000, 0.000000);
  66. TextDrawAlignment(Textdraw0, 1);
  67. TextDrawColor(Textdraw0, 0);
  68. TextDrawUseBox(Textdraw0, true);
  69. TextDrawBoxColor(Textdraw0, 102);
  70. TextDrawSetShadow(Textdraw0, 0);
  71. TextDrawSetOutline(Textdraw0, 0);
  72. TextDrawFont(Textdraw0, 0);
  73.  
  74. Textdraw1 = TextDrawCreate(639.199951, 433.813323, "LD_SPAC:white");
  75. TextDrawLetterSize(Textdraw1, -0.176800, -3.434661);
  76. TextDrawTextSize(Textdraw1, -641.600036, -2.239995);
  77. TextDrawAlignment(Textdraw1, 1);
  78. TextDrawColor(Textdraw1, 41215);
  79. TextDrawSetShadow(Textdraw1, 0);
  80. TextDrawSetOutline(Textdraw1, 0);
  81. TextDrawFont(Textdraw1, 4);
  82.  
  83. Textdraw2 = TextDrawCreate(0.000000, 445.013336, "LD_SPAC:white");
  84. TextDrawLetterSize(Textdraw2, 0.138400, -0.059733);
  85. TextDrawTextSize(Textdraw2, 640.000000, 2.986663);
  86. TextDrawAlignment(Textdraw2, 1);
  87. TextDrawColor(Textdraw2, 41215);
  88. TextDrawSetShadow(Textdraw2, 0);
  89. TextDrawSetOutline(Textdraw2, 0);
  90. TextDrawFont(Textdraw2, 4);
  91.  
  92. Textdraw3 = TextDrawCreate(3.200111, 433.066772, "DA VIDITE LISTU ONLINE ADMINA KUCAJTE /ADMINI");
  93. TextDrawLetterSize(Textdraw3, 0.260400, 1.241600);
  94. TextDrawAlignment(Textdraw3, 1);
  95. TextDrawColor(Textdraw3, -1);
  96. TextDrawSetShadow(Textdraw3, 0);
  97. TextDrawSetOutline(Textdraw3, 0);
  98. TextDrawBackgroundColor(Textdraw3, 51);
  99. TextDrawFont(Textdraw3, 2);
  100. TextDrawSetProportional(Textdraw3, 1);
  101.  
  102. Textdraw4 = TextDrawCreate(378.000000, 434.566650, "usebox");
  103. TextDrawLetterSize(Textdraw4, 0.000000, -2.888515);
  104. TextDrawTextSize(Textdraw4, 502.000000, 0.000000);
  105. TextDrawAlignment(Textdraw4, 1);
  106. TextDrawColor(Textdraw4, 0);
  107. TextDrawUseBox(Textdraw4, true);
  108. TextDrawBoxColor(Textdraw4, 102);
  109. TextDrawSetShadow(Textdraw4, 0);
  110. TextDrawSetOutline(Textdraw4, 0);
  111. TextDrawFont(Textdraw4, 0);
  112.  
  113. Textdraw5 = TextDrawCreate(507.199981, 413.653137, "LD_SPAC:white");
  114. TextDrawLetterSize(Textdraw5, 0.000000, 0.000000);
  115. TextDrawTextSize(Textdraw5, -132.000000, -2.239990);
  116. TextDrawAlignment(Textdraw5, 1);
  117. TextDrawColor(Textdraw5, 41215);
  118. TextDrawSetShadow(Textdraw5, 0);
  119. TextDrawSetOutline(Textdraw5, 0);
  120. TextDrawFont(Textdraw5, 4);
  121.  
  122. Textdraw6 = TextDrawCreate(376.000000, 431.573333, "LD_SPAC:white");
  123. TextDrawLetterSize(Textdraw6, 0.000000, 0.000000);
  124. TextDrawTextSize(Textdraw6, -4.000000, -20.160003);
  125. TextDrawAlignment(Textdraw6, 1);
  126. TextDrawColor(Textdraw6, 41215);
  127. TextDrawSetShadow(Textdraw6, 0);
  128. TextDrawSetOutline(Textdraw6, 0);
  129. TextDrawFont(Textdraw6, 4);
  130.  
  131. Textdraw7 = TextDrawCreate(509.599761, 431.573333, "LD_SPAC:white");
  132. TextDrawLetterSize(Textdraw7, 0.000000, 0.000000);
  133. TextDrawTextSize(Textdraw7, -4.800018, -20.160003);
  134. TextDrawAlignment(Textdraw7, 1);
  135. TextDrawColor(Textdraw7, 41215);
  136. TextDrawSetShadow(Textdraw7, 0);
  137. TextDrawSetOutline(Textdraw7, 0);
  138. TextDrawFont(Textdraw7, 4);
  139.  
  140. Textdraw8 = TextDrawCreate(437.599975, 411.413330, "LD_SPAC:white");
  141. TextDrawLetterSize(Textdraw8, 0.000000, 0.000000);
  142. TextDrawTextSize(Textdraw8, 4.000030, 20.906646);
  143. TextDrawAlignment(Textdraw8, 1);
  144. TextDrawColor(Textdraw8, 41215);
  145. TextDrawSetShadow(Textdraw8, 0);
  146. TextDrawSetOutline(Textdraw8, 0);
  147. TextDrawFont(Textdraw8, 4);
  148.  
  149. Sat0 = TextDrawCreate(378.400024, 413.653289, "23:06:34");
  150. TextDrawLetterSize(Sat0, 0.266000, 1.562666);
  151. TextDrawAlignment(Sat0, 1);
  152. TextDrawColor(Sat0, -1);
  153. TextDrawSetShadow(Sat0, 0);
  154. TextDrawSetOutline(Sat0, 1);
  155. TextDrawBackgroundColor(Sat0, 51);
  156. TextDrawFont(Sat0, 2);
  157. TextDrawSetProportional(Sat0, 1);
  158.  
  159. datum = TextDrawCreate(444.000000, 414.399963, "01/01/2014");
  160. TextDrawLetterSize(datum, 0.250000, 1.637333);
  161. TextDrawAlignment(datum, 1);
  162. TextDrawColor(datum, -1);
  163. TextDrawSetShadow(datum, 0);
  164. TextDrawSetOutline(datum, 1);
  165. TextDrawBackgroundColor(datum, 51);
  166. TextDrawFont(datum, 2);
  167. TextDrawSetProportional(datum, 1);
  168. return 1;
  169. }
  170.  
  171. public OnGameModeExit()
  172. {
  173. TextDrawHideForAll(Textdraw0);
  174. TextDrawDestroy(Textdraw0);
  175. TextDrawHideForAll(Textdraw1);
  176. TextDrawDestroy(Textdraw1);
  177. TextDrawHideForAll(Textdraw2);
  178. TextDrawDestroy(Textdraw2);
  179. TextDrawHideForAll(Textdraw3);
  180. TextDrawDestroy(Textdraw3);
  181. TextDrawHideForAll(Textdraw4);
  182. TextDrawDestroy(Textdraw4);
  183. TextDrawHideForAll(Textdraw5);
  184. TextDrawDestroy(Textdraw5);
  185. TextDrawHideForAll(Textdraw6);
  186. TextDrawDestroy(Textdraw6);
  187. TextDrawHideForAll(Textdraw7);
  188. TextDrawDestroy(Textdraw7);
  189. TextDrawHideForAll(Textdraw8);
  190. TextDrawDestroy(Textdraw8);
  191. TextDrawHideForAll(Sat0);
  192. TextDrawDestroy(Sat0);
  193. TextDrawHideForAll(datum);
  194. TextDrawDestroy(datum);
  195. return 1;
  196. }
  197. //------------------------------------------------------------------------------
  198. public RandomMessage()
  199. {
  200. TextDrawSetString(Textdraw3, RandomMessages[random(sizeof(RandomMessages))]);
  201. return 1;
  202. }
  203. public Sat(playerid)
  204. {
  205. new string[128],sati,minute,sekunde;
  206. gettime(sati, minute, sekunde);
  207. format(string, sizeof string, "%s%d:%s%d:%s%d", (sati < 10) ? ("0") : (""), sati, (minute < 10) ? ("0") : (""), minute, (sekunde < 10) ? ("0") : (""), sekunde);
  208. TextDrawSetString(Sat0, string);
  209. }
  210. public setdatum()
  211. {
  212. new string[128];
  213. new mtdtext[20];
  214. new y, month,d;
  215. getdate(y, month, d);
  216. if(month == 1) { mtdtext = "01"; }
  217. else if(month == 2) { mtdtext = "02"; }
  218. else if(month == 3) { mtdtext = "03"; }
  219. else if(month == 4) { mtdtext = "04"; }
  220. else if(month == 5) { mtdtext = "05"; }
  221. else if(month == 6) { mtdtext = "06"; }
  222. else if(month == 7) { mtdtext = "07"; }
  223. else if(month == 8) { mtdtext = "08"; }
  224. else if(month == 9) { mtdtext = "09"; }
  225. else if(month == 10) { mtdtext = "10"; }
  226. else if(month == 11) { mtdtext = "11"; }
  227. else if(month == 12) { mtdtext = "12"; }
  228. format(string, sizeof string, "~w~~h~%d~w~/~w~~h~%s~w~/~w~~h~%d", d, mtdtext, y);
  229. TextDrawSetString(datum, string);
  230. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement