Advertisement
AiRaLoKa

Moving TextDraw MOTD

Jun 7th, 2014
806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 7.10 KB | None | 0 0
  1. //////////////////////////////////////////////////////////////////////////////////////////
  2. //////////////////////////////////////////////////////////////////////////////////////////
  3. //======================== MOVING TEXTDRAW MOTD R1 BY AiRaLoKa =========================//
  4. //////////////////////////////////////////////////////////////////////////////////////////
  5. //////////////////////////////////////////////////////////////////////////////////////////
  6. //==================================== CREDITS =========================================//
  7. //                         PLEASE DO NOT REMOVE THE CREDITS                             //
  8. //                SA-MP Teams - Wihout they all, this all will never exitst             //
  9. //                          AiRaLoKa - For the whole script                             //
  10. //////////////////////////////////////////////////////////////////////////////////////////
  11. //////////////////////////////////////////////////////////////////////////////////////////
  12.  
  13. //////////////////////////////////////////////////////////////////////////////////////////
  14. //============================== INCLUDE ===============================================//
  15. //////////////////////////////////////////////////////////////////////////////////////////
  16.  
  17. #include <a_samp>
  18.  
  19. //////////////////////////////////////////////////////////////////////////////////////////
  20. //============================== DEFINES ===============================================//
  21. //////////////////////////////////////////////////////////////////////////////////////////
  22.  
  23. #define FILTERSCRIPT
  24.  
  25. //////////////////////////////////////////////////////////////////////////////////////////
  26. //============================== FORWARDS ==============================================//
  27. //////////////////////////////////////////////////////////////////////////////////////////
  28.  
  29. forward MoveText(playerid);
  30.  
  31. //////////////////////////////////////////////////////////////////////////////////////////
  32. //============================== NEWS ==================================================//
  33. //////////////////////////////////////////////////////////////////////////////////////////
  34.  
  35. new Text:MOTDBack;
  36. new Text:MOTD;
  37. new MOTDMovingTimer;
  38. new Float:Pos = 640.000000;
  39. new MOTDText[128] = "This is Message of the Day (You don't say?). Change me! Remember! The maximum size of this MOTD is only 128!";
  40.  
  41. //////////////////////////////////////////////////////////////////////////////////////////
  42. //============================== PUBLICS ===============================================//
  43. //////////////////////////////////////////////////////////////////////////////////////////
  44.  
  45. public OnFilterScriptInit()
  46. {
  47.     MOTDBack = TextDrawCreate(1270.000000, 433.750000, "usebox");
  48.     TextDrawLetterSize(MOTDBack, 0.000000, 3.431018);
  49.     TextDrawTextSize(MOTDBack, -2.100000, 0.000000);
  50.     TextDrawAlignment(MOTDBack, 1);
  51.     TextDrawColor(MOTDBack, 0);
  52.     TextDrawUseBox(MOTDBack, true);
  53.     TextDrawBoxColor(MOTDBack, 102);
  54.     TextDrawSetShadow(MOTDBack, 0);
  55.     TextDrawSetOutline(MOTDBack, 0);
  56.     TextDrawFont(MOTDBack, 0);
  57.  
  58.     MOTD = TextDrawCreate(640.000000, 434.000000, MOTDText);
  59.     TextDrawLetterSize(MOTD, 0.449999, 1.600000);
  60.     TextDrawAlignment(MOTD, 1);
  61.     TextDrawColor(MOTD, -1);
  62.     TextDrawSetShadow(MOTD, 0);
  63.     TextDrawSetOutline(MOTD, 1);
  64.     TextDrawBackgroundColor(MOTD, 51);
  65.     TextDrawFont(MOTD, 1);
  66.     TextDrawSetProportional(MOTD, 1);
  67.  
  68.     MOTDMovingTimer = SetTimer("MoveText", 10, true);
  69.    
  70.     print("\n/////////////////////////////////////////////////////////");
  71.     print("//==== Moving TextDraw MOTD R1 By AiRaLoKa Loaded! ====//");
  72.     print("/////////////////////////////////////////////////////////\n");
  73.     return 1;
  74. }
  75.  
  76. public OnFilterScriptExit()
  77. {
  78.     KillTimer(MOTDMovingTimer);
  79.     TextDrawDestroy(MOTD);
  80.     TextDrawDestroy(MOTDBack);
  81.     return 1;
  82. }
  83.  
  84. public OnPlayerRequestClass(playerid, classid)
  85. {
  86.     return 1;
  87. }
  88.  
  89. public OnPlayerConnect(playerid)
  90. {
  91.     TextDrawShowForPlayer(playerid, Text:MOTDBack);
  92.     return 1;
  93. }
  94.  
  95. public OnPlayerDisconnect(playerid, reason)
  96. {
  97.     return 1;
  98. }
  99.  
  100. public OnPlayerSpawn(playerid)
  101. {
  102.     return 1;
  103. }
  104.  
  105. public OnPlayerDeath(playerid, killerid, reason)
  106. {
  107.     return 1;
  108. }
  109.  
  110. public OnVehicleSpawn(vehicleid)
  111. {
  112.     return 1;
  113. }
  114.  
  115. public OnVehicleDeath(vehicleid, killerid)
  116. {
  117.     return 1;
  118. }
  119.  
  120. public OnPlayerText(playerid, text[])
  121. {
  122.     return 1;
  123. }
  124.  
  125. public OnPlayerCommandText(playerid, cmdtext[])
  126. {
  127.     return 1;
  128. }
  129.  
  130. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  131. {
  132.     return 1;
  133. }
  134.  
  135. public OnPlayerExitVehicle(playerid, vehicleid)
  136. {
  137.     return 1;
  138. }
  139.  
  140. public OnPlayerStateChange(playerid, newstate, oldstate)
  141. {
  142.     return 1;
  143. }
  144.  
  145. public OnPlayerEnterCheckpoint(playerid)
  146. {
  147.     return 1;
  148. }
  149.  
  150. public OnPlayerLeaveCheckpoint(playerid)
  151. {
  152.     return 1;
  153. }
  154.  
  155. public OnPlayerEnterRaceCheckpoint(playerid)
  156. {
  157.     return 1;
  158. }
  159.  
  160. public OnPlayerLeaveRaceCheckpoint(playerid)
  161. {
  162.     return 1;
  163. }
  164.  
  165. public OnRconCommand(cmd[])
  166. {
  167.     return 1;
  168. }
  169.  
  170. public OnPlayerRequestSpawn(playerid)
  171. {
  172.     return 1;
  173. }
  174.  
  175. public OnObjectMoved(objectid)
  176. {
  177.     return 1;
  178. }
  179.  
  180. public OnPlayerObjectMoved(playerid, objectid)
  181. {
  182.     return 1;
  183. }
  184.  
  185. public OnPlayerPickUpPickup(playerid, pickupid)
  186. {
  187.     return 1;
  188. }
  189.  
  190. public OnVehicleMod(playerid, vehicleid, componentid)
  191. {
  192.     return 1;
  193. }
  194.  
  195. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  196. {
  197.     return 1;
  198. }
  199.  
  200. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  201. {
  202.     return 1;
  203. }
  204.  
  205. public OnPlayerSelectedMenuRow(playerid, row)
  206. {
  207.     return 1;
  208. }
  209.  
  210. public OnPlayerExitedMenu(playerid)
  211. {
  212.     return 1;
  213. }
  214.  
  215. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  216. {
  217.     return 1;
  218. }
  219.  
  220. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  221. {
  222.     return 1;
  223. }
  224.  
  225. public OnRconLoginAttempt(ip[], password[], success)
  226. {
  227.     return 1;
  228. }
  229.  
  230. public OnPlayerUpdate(playerid)
  231. {
  232.     return 1;
  233. }
  234.  
  235. public OnPlayerStreamIn(playerid, forplayerid)
  236. {
  237.     return 1;
  238. }
  239.  
  240. public OnPlayerStreamOut(playerid, forplayerid)
  241. {
  242.     return 1;
  243. }
  244.  
  245. public OnVehicleStreamIn(vehicleid, forplayerid)
  246. {
  247.     return 1;
  248. }
  249.  
  250. public OnVehicleStreamOut(vehicleid, forplayerid)
  251. {
  252.     return 1;
  253. }
  254.  
  255. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  256. {
  257.     return 1;
  258. }
  259.  
  260. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  261. {
  262.     return 1;
  263. }
  264.  
  265. public MoveText()
  266. {
  267.     if(Pos > -1300.000000)
  268.     {
  269.         Pos -= 0.5;
  270.         TextDrawDestroy(Text:MOTD);
  271.         MOTD = TextDrawCreate(Pos, 434.000000, MOTDText);
  272.         TextDrawLetterSize(MOTD, 0.449999, 1.600000);
  273.         TextDrawAlignment(MOTD, 1);
  274.         TextDrawColor(MOTD, -1);
  275.         TextDrawSetShadow(MOTD, 0);
  276.         TextDrawSetOutline(MOTD, 1);
  277.         TextDrawBackgroundColor(MOTD, 51);
  278.         TextDrawFont(MOTD, 1);
  279.         TextDrawSetProportional(MOTD, 1);
  280.         TextDrawShowForAll(Text:MOTD);
  281.     }
  282.     else
  283.     {
  284.         KillTimer(MOTDMovingTimer);
  285.         Pos = 640.000000;
  286.         MOTDMovingTimer = SetTimer("MoveText", 10, true);
  287.     }
  288.     return 1;
  289. }
  290.  
  291. //////////////////////////////////////////////////////////////////////////////////////////
  292. //========================== END OF MOVING TEXTDRAW MOTD R1 ============================//
  293. //////////////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement