Guest User

[ Random Server Messages FilterScript ]

a guest
Jul 23rd, 2011
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.18 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. forward MSG();
  4.  
  5. #define Light_Blue 0x00CCFF
  6. #define White 0xFFFFFF
  7. #define Gray 0x222222BB
  8.  
  9. new Text:ServerMSG;
  10.  
  11. new RMessages[][] =
  12. {
  13.     "~r~ [ ~b~Server MSG: ~g~Random Text Here. ~r~ ]",
  14.     "~r~ [ ~b~Server MSG: ~g~Random Text Here. ~r~ ]",
  15.     "~r~ [ ~b~Server MSG: ~g~Random Text Here. ~r~ ]",
  16.     "~r~ [ ~b~Server MSG: ~g~Random Text Here. ~r~ ]",
  17.     "~r~ [ ~b~Server MSG: ~g~Random Text Here. ~r~ ]"
  18. };
  19.  
  20. public OnFilterScriptInit()
  21. {
  22.     print("Server MSG v1.0");
  23.     SetTimer("MSG", 8000, true);
  24.     ServerMSG = TextDrawCreate(1.000000, 428.000000, "[ Server MSG");
  25.     TextDrawColor(ServerMSG, Light_Blue);
  26.     TextDrawFont(ServerMSG, 1);
  27.     TextDrawLetterSize(ServerMSG, 0.500000, 2.000000);
  28.     TextDrawSetProportional(ServerMSG, 1);
  29.     TextDrawSetOutline(ServerMSG, 1);
  30.     TextDrawSetShadow(ServerMSG, 2);
  31.     TextDrawBackgroundColor(ServerMSG, White);
  32.     TextDrawUseBox(ServerMSG, 1);
  33.     TextDrawBoxColor(ServerMSG,  Gray);
  34.     TextDrawTextSize(ServerMSG, 643.0000, 1.000000);
  35.  
  36. }
  37.  
  38. public MSG()
  39. {
  40.     TextDrawSetString(ServerMSG, RMessages[random(sizeof(RMessages))]);
  41.     return 1;
  42. }
  43.  
  44. public OnPlayerSpawn(playerid)
  45. {
  46.     TextDrawShowForPlayer(playerid, ServerMSG);
  47.     return 1;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment