Guest User

VremeDatumFS

a guest
Feb 28th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.77 KB | None | 0 0
  1. //==============================================================================
  2. /*
  3. FilterScript (Vreme/Datum)
  4. FilterScript made WrongMonkey
  5. */
  6. //==============================================================================
  7. //============================================================================== Include
  8. #include < a_samp >
  9. //============================================================================== TextDraw's
  10. new Text:Vreme;
  11. new Text:Datum;
  12. //==============================================================================
  13. public OnFilterScriptInit()
  14. {
  15. print("==============================");
  16. print("FilterScript (Vreme/Datum) by WrongMonkey");
  17. print("==============================");
  18. //==============================================================================
  19. SetTimer("VremeDatumTimer",1000,true);
  20. Vreme = TextDrawCreate(62.576492, 309.000030, "00:00:00");
  21. TextDrawLetterSize(Vreme, 0.280470, 1.354999);
  22. TextDrawAlignment(Vreme, 1);
  23. TextDrawColor(Vreme, -1);
  24. TextDrawSetShadow(Vreme, 0);
  25. TextDrawSetOutline(Vreme, 1);
  26. TextDrawBackgroundColor(Vreme, 255);
  27. TextDrawFont(Vreme, 1);
  28. TextDrawSetProportional(Vreme, 1);
  29. TextDrawSetShadow(Vreme, 0);
  30.  
  31. SetTimer("VremeDatumTimer",1000,true);
  32. Datum = TextDrawCreate(85.505920, 322.416717, "00/00/2018");
  33. TextDrawLetterSize(Datum, 0.280470, 1.354999);
  34. TextDrawAlignment(Datum, 2);
  35. TextDrawColor(Datum, -1);
  36. TextDrawSetShadow(Datum, 0);
  37. TextDrawSetOutline(Datum, 1);
  38. TextDrawBackgroundColor(Datum, 255);
  39. TextDrawFont(Datum, 1);
  40. TextDrawSetProportional(Datum, 1);
  41. TextDrawSetShadow(Datum, 0);
  42. //==============================================================================
  43. return 1;
  44. }
  45.  
  46. public OnFilterScriptExit()
  47. {
  48. return 1;
  49. }
  50.  
  51. public OnPlayerRequestClass(playerid, classid)
  52. {
  53. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  54. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  55. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  56. return 1;
  57. }
  58.  
  59. public OnPlayerConnect(playerid)
  60. {
  61. return 1;
  62. }
  63.  
  64. public OnPlayerDisconnect(playerid, reason)
  65. {
  66. //==============================================================================
  67. TextDrawHideForPlayer(playerid, Vreme);
  68. TextDrawHideForPlayer(playerid, Datum);
  69. //==============================================================================
  70. return 1;
  71. }
  72.  
  73. public OnPlayerSpawn(playerid)
  74. {
  75. //==============================================================================
  76. TextDrawShowForPlayer(playerid, Vreme);
  77. TextDrawShowForPlayer(playerid, Datum);
  78. //==============================================================================
  79. return 1;
  80. }
  81.  
  82. public OnPlayerDeath(playerid, killerid, reason)
  83. {
  84. return 1;
  85. }
  86.  
  87. public OnVehicleSpawn(vehicleid)
  88. {
  89. return 1;
  90. }
  91.  
  92. public OnVehicleDeath(vehicleid, killerid)
  93. {
  94. return 1;
  95. }
  96.  
  97. public OnPlayerText(playerid, text[])
  98. {
  99. return 1;
  100. }
  101.  
  102. public OnPlayerCommandText(playerid, cmdtext[])
  103. {
  104. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  105. {
  106. return 1;
  107. }
  108. return 0;
  109. }
  110.  
  111. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  112. {
  113. return 1;
  114. }
  115.  
  116. public OnPlayerExitVehicle(playerid, vehicleid)
  117. {
  118. return 1;
  119. }
  120.  
  121. public OnPlayerStateChange(playerid, newstate, oldstate)
  122. {
  123. return 1;
  124. }
  125.  
  126. public OnPlayerEnterCheckpoint(playerid)
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnPlayerLeaveCheckpoint(playerid)
  132. {
  133. return 1;
  134. }
  135.  
  136. public OnPlayerEnterRaceCheckpoint(playerid)
  137. {
  138. return 1;
  139. }
  140.  
  141. public OnPlayerLeaveRaceCheckpoint(playerid)
  142. {
  143. return 1;
  144. }
  145.  
  146. public OnRconCommand(cmd[])
  147. {
  148. return 1;
  149. }
  150.  
  151. public OnPlayerRequestSpawn(playerid)
  152. {
  153. return 1;
  154. }
  155.  
  156. public OnObjectMoved(objectid)
  157. {
  158. return 1;
  159. }
  160.  
  161. public OnPlayerObjectMoved(playerid, objectid)
  162. {
  163. return 1;
  164. }
  165.  
  166. public OnPlayerPickUpPickup(playerid, pickupid)
  167. {
  168. return 1;
  169. }
  170.  
  171. public OnVehicleMod(playerid, vehicleid, componentid)
  172. {
  173. return 1;
  174. }
  175.  
  176. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  177. {
  178. return 1;
  179. }
  180.  
  181. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  182. {
  183. return 1;
  184. }
  185.  
  186. public OnPlayerSelectedMenuRow(playerid, row)
  187. {
  188. return 1;
  189. }
  190.  
  191. public OnPlayerExitedMenu(playerid)
  192. {
  193. return 1;
  194. }
  195.  
  196. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  197. {
  198. return 1;
  199. }
  200.  
  201. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  202. {
  203. return 1;
  204. }
  205.  
  206. public OnRconLoginAttempt(ip[], password[], success)
  207. {
  208. return 1;
  209. }
  210.  
  211. public OnPlayerUpdate(playerid)
  212. {
  213. return 1;
  214. }
  215.  
  216. public OnPlayerStreamIn(playerid, forplayerid)
  217. {
  218. return 1;
  219. }
  220.  
  221. public OnPlayerStreamOut(playerid, forplayerid)
  222. {
  223. return 1;
  224. }
  225.  
  226. public OnVehicleStreamIn(vehicleid, forplayerid)
  227. {
  228. return 1;
  229. }
  230.  
  231. public OnVehicleStreamOut(vehicleid, forplayerid)
  232. {
  233. return 1;
  234. }
  235.  
  236. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  237. {
  238. return 1;
  239. }
  240.  
  241. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  242. {
  243. return 1;
  244. }
  245. //==============================================================================
  246. forward VremeDatumTimer(playerid);
  247. public VremeDatumTimer(playerid)
  248. {
  249. new string[128],godina,mesec,dan,sati,minute,sekunde;
  250. getdate(godina, mesec, dan), gettime(sati, minute, sekunde);
  251. format(string, sizeof string, "%d/%s%d/%s%d", dan, ((mesec < 10) ? ("0") : ("")), mesec, (godina < 10) ? ("0") : (""), godina);
  252. TextDrawSetString(Datum, string);
  253. format(string, sizeof string, "%s%d:%s%d:%s%d", (sati < 10) ? ("0") : (""), sati, (minute < 10) ? ("0") : (""), minute, (sekunde < 10) ? ("0") : (""), sekunde);
  254. TextDrawSetString(Vreme, string);
  255. }
  256. //==============================================================================
  257. /*
  258. End FilterScript
  259. FilterScript (Vreme/Datum)
  260. FilterScript made WrongMonkey
  261. */
  262. //==============================================================================
Add Comment
Please, Sign In to add comment