Guest User

RandomPorukeTD by Jevtic

a guest
Dec 26th, 2016
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.07 KB | None | 0 0
  1. /*______________________________________________________________________________
  2.  
  3. RandomPorukeTD by Jevtic
  4. Napravio: Jevtic
  5. Vreme izrade: 2 MIN Script i 5 MIN TD pravljenje
  6. Ostavite neki credits
  7.  
  8. ________________________________________________________________________________
  9. */
  10.  
  11.  
  12. //______________________________________________________________________________
  13.  
  14. #include < a_samp >
  15. #include < YSI\y_commands >
  16.  
  17. //______________________________________________________________________________
  18.  
  19. #define SCM SendClientMessage
  20. #define TDSFP TextDrawShowForPlayer
  21. #define TDHFP TextDrawHideForPlayer
  22. #define TDD TextDrawDestroy
  23.  
  24. //______________________________________________________________________________
  25.  
  26. #define PLAVA "{2787D8}"
  27. #define BELA "{FFFFFF}"
  28. //______________________________________________________________________________
  29.  
  30. new Text:RandomPoruke[6];
  31. //______________________________________________________________________________
  32.  
  33.  
  34.  
  35. public OnFilterScriptInit()
  36. {
  37. print("_________________________________________");
  38. print("- RandomPorukeTD by Lazar a.k.a Jevtic -");
  39. print("_________________________________________");
  40. //______________________________________________________________________________
  41.  
  42.  
  43.  
  44. RandomPoruke[0] = TextDrawCreate(2.000000, 432.875000, "usebox");
  45. TextDrawLetterSize(RandomPoruke[0], 0.000000, 1.481944);
  46. TextDrawTextSize(RandomPoruke[0], 637.500000, 0.000000);
  47. TextDrawAlignment(RandomPoruke[0], 1);
  48. TextDrawColor(RandomPoruke[0], 0);
  49. TextDrawUseBox(RandomPoruke[0], true);
  50. TextDrawBoxColor(RandomPoruke[0], 102);
  51. TextDrawSetShadow(RandomPoruke[0], 0);
  52. TextDrawSetOutline(RandomPoruke[0], 0);
  53. TextDrawFont(RandomPoruke[0], 0);
  54.  
  55. RandomPoruke[1] = TextDrawCreate(0.000000, 430.937500, "LD_SPAC:white");
  56. TextDrawLetterSize(RandomPoruke[1], 0.000000, 0.000000);
  57. TextDrawTextSize(RandomPoruke[1], 640.000000, 2.187500);
  58. TextDrawAlignment(RandomPoruke[1], 1);
  59. TextDrawColor(RandomPoruke[1], 107794377);
  60. TextDrawSetShadow(RandomPoruke[1], 0);
  61. TextDrawSetOutline(RandomPoruke[1], 0);
  62. TextDrawFont(RandomPoruke[1], 4);
  63.  
  64. RandomPoruke[2] = TextDrawCreate(639.500000, 445.375000, "LD_SPAC:white");
  65. TextDrawLetterSize(RandomPoruke[2], 0.000000, 0.000000);
  66. TextDrawTextSize(RandomPoruke[2], -639.500000, 2.625000);
  67. TextDrawAlignment(RandomPoruke[2], 1);
  68. TextDrawColor(RandomPoruke[2], 107794377);
  69. TextDrawSetShadow(RandomPoruke[2], 0);
  70. TextDrawSetOutline(RandomPoruke[2], 0);
  71. TextDrawFont(RandomPoruke[2], 4);
  72.  
  73. RandomPoruke[3] = TextDrawCreate(0.000000, 430.937500, "LD_SPAC:white");
  74. TextDrawLetterSize(RandomPoruke[3], 0.000000, 0.000000);
  75. TextDrawTextSize(RandomPoruke[3], 2.000000, 14.875000);
  76. TextDrawAlignment(RandomPoruke[3], 1);
  77. TextDrawColor(RandomPoruke[3], 107794377);
  78. TextDrawSetShadow(RandomPoruke[3], 0);
  79. TextDrawSetOutline(RandomPoruke[3], 0);
  80. TextDrawFont(RandomPoruke[3], 4);
  81.  
  82. RandomPoruke[4] = TextDrawCreate(636.500000, 431.375000, "LD_SPAC:white");
  83. TextDrawLetterSize(RandomPoruke[4], 0.000000, 0.000000);
  84. TextDrawTextSize(RandomPoruke[4], 3.500000, 14.875000);
  85. TextDrawAlignment(RandomPoruke[4], 1);
  86. TextDrawColor(RandomPoruke[4], 107794377);
  87. TextDrawSetShadow(RandomPoruke[4], 0);
  88. TextDrawSetOutline(RandomPoruke[4], 0);
  89. TextDrawFont(RandomPoruke[4], 4);
  90.  
  91. RandomPoruke[5] = TextDrawCreate(201.000000, 435.312500, "Auto Message: Ako ste novajlija i ako vam je potrebna pomoc ukucajte /novi");
  92. TextDrawLetterSize(RandomPoruke[5], 0.112999, 0.843125);
  93. TextDrawAlignment(RandomPoruke[5], 1);
  94. TextDrawColor(RandomPoruke[5], -1);
  95. TextDrawSetShadow(RandomPoruke[5], 0);
  96. TextDrawSetOutline(RandomPoruke[5], 1);
  97. TextDrawBackgroundColor(RandomPoruke[5], 51);
  98. TextDrawFont(RandomPoruke[5], 2);
  99. TextDrawSetProportional(RandomPoruke[5], 1);
  100. SetTimer("PorukeTD", 3000, true);
  101. //______________________________________________________________________________
  102.  
  103. return 1;
  104. }
  105.  
  106. public OnFilterScriptExit()
  107. {
  108. return 1;
  109. }
  110.  
  111. public OnPlayerRequestClass(playerid, classid)
  112. {
  113. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  114. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  115. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  116. return 1;
  117. }
  118.  
  119. public OnPlayerConnect(playerid)
  120. {
  121. SCM( playerid , -1,""PLAVA"INFO: "BELA"Ovaj server koristi FS RandomPorukeTD by Jevtic");
  122. SCM( playerid , -1,""PLAVA"INFO: "BELA"Facebook: www.fb.com/jevttabrat");
  123. SCM( playerid , -1,""PLAVA"INFO: "BELA"Forum: www.zbsamp.com");
  124. SCM( playerid , -1,""PLAVA"INFO: "BELA"Forum: www.balkan-samp.com");
  125. return 1;
  126. }
  127.  
  128. public OnPlayerDisconnect(playerid, reason)
  129. {
  130. //______________________________________________________________________________
  131.  
  132. TDD( RandomPoruke[0] ); TDD( RandomPoruke[1] ); TDD( RandomPoruke[2] );
  133. TDD( RandomPoruke[3] ); TDD( RandomPoruke[4] ); TDD( RandomPoruke[5] );
  134. //______________________________________________________________________________
  135.  
  136. return 1;
  137. }
  138.  
  139. public OnPlayerSpawn(playerid)
  140. {
  141. //______________________________________________________________________________
  142.  
  143. TDSFP( playerid , RandomPoruke[0] ); TDSFP( playerid , RandomPoruke[3] );
  144. TDSFP( playerid , RandomPoruke[1] ); TDSFP( playerid , RandomPoruke[4] );
  145. TDSFP( playerid , RandomPoruke[2] ); TDSFP( playerid , RandomPoruke[5] );
  146. //______________________________________________________________________________
  147.  
  148. return 1;
  149. }
  150.  
  151. public OnPlayerDeath(playerid, killerid, reason)
  152. {
  153. return 1;
  154. }
  155.  
  156. public OnVehicleSpawn(vehicleid)
  157. {
  158. return 1;
  159. }
  160.  
  161. public OnVehicleDeath(vehicleid, killerid)
  162. {
  163. return 1;
  164. }
  165.  
  166. public OnPlayerText(playerid, text[])
  167. {
  168. return 1;
  169. }
  170.  
  171. public OnPlayerCommandText(playerid, cmdtext[])
  172. {
  173. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  174. {
  175. // Do something here
  176. return 1;
  177. }
  178. return 0;
  179. }
  180.  
  181. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  182. {
  183. return 1;
  184. }
  185.  
  186. public OnPlayerExitVehicle(playerid, vehicleid)
  187. {
  188. return 1;
  189. }
  190.  
  191. public OnPlayerStateChange(playerid, newstate, oldstate)
  192. {
  193. return 1;
  194. }
  195.  
  196. public OnPlayerEnterCheckpoint(playerid)
  197. {
  198. return 1;
  199. }
  200.  
  201. public OnPlayerLeaveCheckpoint(playerid)
  202. {
  203. return 1;
  204. }
  205.  
  206. public OnPlayerEnterRaceCheckpoint(playerid)
  207. {
  208. return 1;
  209. }
  210.  
  211. public OnPlayerLeaveRaceCheckpoint(playerid)
  212. {
  213. return 1;
  214. }
  215.  
  216. public OnRconCommand(cmd[])
  217. {
  218. return 1;
  219. }
  220.  
  221. public OnPlayerRequestSpawn(playerid)
  222. {
  223. return 1;
  224. }
  225.  
  226. public OnObjectMoved(objectid)
  227. {
  228. return 1;
  229. }
  230.  
  231. public OnPlayerObjectMoved(playerid, objectid)
  232. {
  233. return 1;
  234. }
  235.  
  236. public OnPlayerPickUpPickup(playerid, pickupid)
  237. {
  238. return 1;
  239. }
  240.  
  241. public OnVehicleMod(playerid, vehicleid, componentid)
  242. {
  243. return 1;
  244. }
  245.  
  246. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  247. {
  248. return 1;
  249. }
  250.  
  251. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  252. {
  253. return 1;
  254. }
  255.  
  256. public OnPlayerSelectedMenuRow(playerid, row)
  257. {
  258. return 1;
  259. }
  260.  
  261. public OnPlayerExitedMenu(playerid)
  262. {
  263. return 1;
  264. }
  265.  
  266. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  267. {
  268. return 1;
  269. }
  270.  
  271. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  272. {
  273. return 1;
  274. }
  275.  
  276. public OnRconLoginAttempt(ip[], password[], success)
  277. {
  278. return 1;
  279. }
  280.  
  281. public OnPlayerUpdate(playerid)
  282. {
  283. return 1;
  284. }
  285.  
  286. public OnPlayerStreamIn(playerid, forplayerid)
  287. {
  288. return 1;
  289. }
  290.  
  291. public OnPlayerStreamOut(playerid, forplayerid)
  292. {
  293. return 1;
  294. }
  295.  
  296. public OnVehicleStreamIn(vehicleid, forplayerid)
  297. {
  298. return 1;
  299. }
  300.  
  301. public OnVehicleStreamOut(vehicleid, forplayerid)
  302. {
  303. return 1;
  304. }
  305.  
  306. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  307. {
  308. return 1;
  309. }
  310.  
  311. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  312. {
  313. return 1;
  314. }
  315. //______________________________________________________________________________
  316.  
  317. new RandomPorukeTD[][] =
  318. {
  319. "MSG: Ako vam je potrebna pomoc ukucajte /askq!",
  320. "MSG: Postanite deo promoter teama reklamiranjem!",
  321. "MSG: Donacijom pomazete u daljem ocuvanju servera!",
  322. "MSG: Prijatelji servera su: www.zbsamp.com i balkan-samp.com posetite!",
  323. "MSG: Ukoliko primetite citera prijavite ga /report!",
  324. "MSG: Postujte druge igrace kako bi oni postovali vas!"
  325. };
  326. //______________________________________________________________________________
  327.  
  328. forward PorukeTD();
  329. public PorukeTD()
  330. {
  331. TextDrawSetString(RandomPoruke[5], RandomPorukeTD[random(sizeof(RandomPorukeTD))]);
  332. return 1;
  333. }
  334. //______________________________________________________________________________
  335.  
  336.  
  337. //______________________________________________________________________________
  338.  
  339. YCMD:tdoff ( playerid , params[] ,help )
  340. {
  341. #pragma unused help
  342.  
  343. TDHFP( playerid , RandomPoruke[0] ); TDHFP( playerid , RandomPoruke[3] );
  344. TDHFP( playerid , RandomPoruke[1] ); TDHFP( playerid , RandomPoruke[4] );
  345. TDHFP( playerid , RandomPoruke[2] ); TDHFP( playerid , RandomPoruke[5] );
  346.  
  347. return 1;
  348. }
  349.  
  350. //______________________________________________________________________________
  351.  
  352. YCMD:tdon ( playerid , params[] ,help )
  353. {
  354. #pragma unused help
  355.  
  356. TDSFP( playerid , RandomPoruke[0] ); TDSFP( playerid , RandomPoruke[3] );
  357. TDSFP( playerid , RandomPoruke[1] ); TDSFP( playerid , RandomPoruke[4] );
  358. TDSFP( playerid , RandomPoruke[2] ); TDSFP( playerid , RandomPoruke[5] );
  359.  
  360. return 1;
  361. }
  362. //______________________________________________________________________________
  363.  
  364. /*
  365. ________________________________________________________________________________
  366.  
  367.  
  368. INFO: U slucaju da hocete povecate brzinu td-ova ili da smanjite
  369. INFO: U Timeru gde pise 3000 stavite vasu brzinu 3000 ( 3 Sec )
  370. INFO: 1000 = 1 SEC
  371. INFO: Ostavite neki credits
  372.  
  373. //______________________________________________________________________________
  374. */
Advertisement
Add Comment
Please, Sign In to add comment