muHamad-asYraf-aKmal

::: Simple Random Message by [Asy]Akmal :::

Nov 18th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.29 KB | None | 0 0
  1.   ///////////////////////////////////////////////////////////
  2.   //                                                       //
  3.   // ////////  //    //  ////     ////  ////////  //       //
  4.   // //    //  //   //   // //   // //  //    //  //       //
  5.   // //    //  //  //    //  // //  //  //    //  //       //
  6.   // ////////  ////      //   ///   //  ////////  //       //
  7.   // //    //  //  //    //         //  //    //  //       //
  8.   // //    //  //   //   //         //  //    //  //       //
  9.   // //    //  //    //  //         //  //    //  //////// //
  10.   //                                                       //
  11.   ///////////////////////////////////////////////////////////
  12.   //           Created by [Asy]Akmal 06/06/2000            //
  13.   ///////////////////////////////////////////////////////////
  14.  
  15. #include <a_samp>
  16.  
  17. new Text:shadow;
  18.  
  19. public OnFilterScriptInit()
  20. {
  21.     print("\n Simple Random Message by [Asy]Akmal \n");
  22.     SetTimer("SendMessageToPublic", 240000, true); // 3 minutes only.
  23.    
  24.     SetTimer("TimerChange", 3000, 1);
  25.  
  26.     shadow = TextDrawCreate(18.000000, 428.000000, " ");
  27.     TextDrawAlignment(shadow, 0);
  28.     TextDrawBackgroundColor(shadow, 0x000000FF);
  29.     TextDrawFont(shadow, 2);
  30.     TextDrawLetterSize(shadow, 0.199999, 0.899999);
  31.     TextDrawColor(shadow, 0xFFFFFFFF);
  32.     TextDrawSetOutline(shadow, 1);
  33.     TextDrawSetProportional(shadow, 1);
  34.     TextDrawSetShadow(shadow, 1);
  35.     return 1;
  36. }
  37.  
  38. public OnFilterScriptExit()
  39. {
  40.     return 1;
  41. }
  42.  
  43. new RandomMessage[][] = // Edit 'Your Random Message' to change your messages favourite.
  44. {
  45.     "Your Random Message",
  46.     "Your Random Message",
  47.     "Your Random Message"
  48. };
  49.  
  50. new Intro[][] = // Change This All.
  51. {
  52.     "Change Ip Addreas",
  53.     "Put Samp Server Name"
  54. };
  55.  
  56. public OnPlayerConnect(playerid)
  57. {
  58.     new string[MAX_PLAYERS], name[MAX_PLAYER_NAME];
  59.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  60.     format(string, sizeof(string), "||| %s has joined the server |||", name);
  61.     SendClientMessageToAll(0xFFFFFFAA, string);  // Change your favourite color.
  62.     SendClientMessage(playerid, 0xFFFFFFAA, "::: Simple Random Message by [Asy]Akmal :::");
  63.     return 1;
  64. }
  65.  
  66. public OnPlayerDisconnect(playerid, reason)
  67. {
  68.     new name[MAX_PLAYER_NAME], string[MAX_PLAYERS];
  69.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  70.     switch(reason)
  71.     {
  72.         case 0: format(string, sizeof(string), "||| %s has left the server (Timeout) |||", name);
  73.         case 1: format(string, sizeof(string), "||| %s has left the server (Leaving) |||", name);
  74.         case 2: format(string, sizeof(string), "||| %s has left the server (Kicked/Banned) |||", name);
  75.     }
  76.     SendClientMessageToAll(0xFFFFFFAA, string); // Change your favourite color.
  77.     return 1;
  78. }
  79.  
  80. public OnPlayerSpawn(playerid)
  81. {
  82.     TextDrawShowForPlayer(playerid, shadow);
  83.     return 1;
  84. }
  85.  
  86. forward SendMessageToPublic();
  87. public SendMessageToPublic()
  88. {
  89.     new rand = random(sizeof(RandomMessage));
  90.     SendClientMessageToAll(-1, RandomMessage[rand]); // Don't edit this script line.
  91. }
  92.  
  93. forward TimerChange();
  94. public TimerChange()
  95. {
  96.     TextDrawSetString(shadow, Intro[random(sizeof(Intro))]);
  97.     return 1;
  98. }
  99.  
  100. public OnPlayerDeath(playerid, killerid, reason)
  101. {
  102.     SendDeathMessage(killerid, playerid, reason); // Shows the kill in the killfeed
  103.     return 1;
  104. }
Advertisement
Add Comment
Please, Sign In to add comment