MrKakashi

Random Message

Aug 28th, 2011
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. #define RANDOM_MESSAGE_TIMER 60000 //Autoannounce Message 600000 = 1 Minute //on the top of script
  2.  
  3. #define COLOR_RED 0xFF0000FF //You Can Change it :D //on the top of script
  4.  
  5. new messagenumber = 0; //on the top of script
  6. new messages[][] = //on the top of script
  7. {
  8. "[SERVER]:Dont Know All Commands?,Try /cmds",
  9. "[SERVER]:Want to change your name color?,Try our new /changemycolour",
  10. "[SERVER]:Want to Be Admin?, Apply On Forum At www.stunt-planet.co.nr",
  11. "[SERVER]:Want to Be Xtreme Stunting Member? Remember Just Put [XS] To Your Name or After You Name",
  12. "[SERVER]:[WP] Clan is The Secondary Clan of XS its not free clan to join the clan you must apply on forum",
  13. "[SERVER]:Want To Make your own clan? You must sign in/sign up to our permit on forum before making clan.",
  14. "[SERVER]:Dont Know All Teleport Commands?,Try /tele (/teleports)",
  15. "[SERVER]:Didnt read rules yet?,Try /rules",
  16. "[SERVER]:Clan Making Needs A Permit if you make a clan without permit your clan will be banned",
  17. "[SERVER]:Gamemode Credits To Mr.Kakashi"
  18. };
  19.  
  20. SetTimer("SendMessages", RANDOM_MESSAGE_TIMER, true); //Timer - Put this ongamemodeinit
  21.  
  22.  
  23. forward SendMessages(); //everywhere except on the top of script
  24. public SendMessages()
  25. {
  26. if(messagenumber == sizeof(messages)) messagenumber = 0;
  27. SendClientMessageToAll(COLOR_RED, messages[messagenumber]);
  28. messagenumber ++;
  29. return 1;
  30. }
  31.  
  32.  
  33. //You must define COLOR_RED
  34.  
  35. Example
  36.  
  37. #include <a_samp>
  38.  
  39.  
  40. #define COLOR_RED 0xFF0000FF
  41.  
  42. #define RANDOM_MESSAGE_TIMER 100000
  43.  
  44. new messagenumber = 0;
  45. new messages[][] =
  46. {
  47. "[SERVER]:Dont Know All Commands?,Try /cmds",
  48. "[SERVER]:Want to change your name color?,Try our new /changemycolour",
  49. "[SERVER]:Want to Be Admin?, Apply On Forum At www.stunt-planet.co.nr",
  50. "[SERVER]:Want to Be Xtreme Stunting Member? Remember Just Put [XS] To Your Name or After You Name",
  51. "[SERVER]:[WP] Clan is The Secondary Clan of XS its not free clan to join the clan you must apply on forum",
  52. "[SERVER]:Want To Make your own clan? You must sign in/sign up to our permit on forum before making clan.",
  53. "[SERVER]:Dont Know All Teleport Commands?,Try /tele (/teleports)",
  54. "[SERVER]:New Features Added! DM + Teleports + 0.3c Objects!",
  55. "[SERVER]:Xtreme Kakashi V2 - Full Version - New Features!",
  56. "[SERVER]:Didnt read rules yet?,Try /rules",
  57. "[SERVER]:Clan Making Needs A Permit if you make a clan without permit your clan will be banned",
  58. "[SERVER]:Gamemode Credits To Mr.Kakashi"
  59. };
  60.  
  61.  
  62. public OnGameModeInit()
  63. {
  64. SetTimer("SendMessages", RANDOM_MESSAGE_TIMER, true);
  65. return 1;
  66. }
  67.  
  68.  
  69. forward SendMessages(); //everywhere except on the top of script
  70. public SendMessages()
  71. {
  72. if(messagenumber == sizeof(messages)) messagenumber = 0;
  73. SendClientMessageToAll(COLOR_RED, messages[messagenumber]);
  74. messagenumber ++;
  75. return 1;
  76. }
Advertisement
Add Comment
Please, Sign In to add comment