Advertisement
kelvinis

Admin System

Aug 7th, 2013
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.91 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define FILTERSCRIPT
  4.  
  5. #if defined FILTERSCRIPT
  6.  
  7. forward Nupdate ();
  8. new Ntimer;
  9.  
  10. new Text:Ntick;
  11.  
  12. new news[][] =
  13. {
  14. "Your_text_here", "Your_text_here", "Your_text_here"
  15. };
  16. //Adding a new line:
  17. //You can add a new line by adding a "," behind the Last Line. Then add "Your_text_here".
  18. //WARNING: Use "_" As a Space! otherwise it will Skip everything!!!
  19.  
  20. public OnFilterScriptInit()
  21. {
  22.     Ntimer = SetTimer("Nupdate", 5000, 1);
  23.     print("\n--------------------------------------");
  24.     print(" News Ticker/System By kelvinis ");
  25.     print(" LOADED ");
  26.     print("--------------------------------------\n");
  27.     Ntick = TextDrawCreate(321.000000,435.000000,"Your News here");
  28.     TextDrawUseBox(Ntick,1);
  29.     TextDrawBoxColor(Ntick,0x00000099);
  30.     TextDrawTextSize(Ntick,0.000000,631.000000);
  31.     TextDrawAlignment(Ntick,2);
  32.     TextDrawBackgroundColor(Ntick,0x000000ff);
  33.     TextDrawFont(Ntick,3);
  34.     TextDrawLetterSize(Ntick,0.399999,1.100000);
  35.     TextDrawColor(Ntick,0xffffffff);
  36.     TextDrawSetOutline(Ntick,1);
  37.     TextDrawSetProportional(Ntick,1);
  38.     TextDrawSetShadow(Ntick,1);
  39.     return 1;
  40. }
  41.  
  42. public OnFilterScriptExit()
  43. {
  44.     KillTimer(Ntimer);
  45.     print("\n--------------------------------------");
  46.     print(" News Ticker/System By kelvinis");
  47.     print(" UNLOADED ");
  48.     print("--------------------------------------\n");
  49.     TextDrawDestroy(Ntick);
  50.     return 1;
  51. }
  52.  
  53. #else
  54.  
  55. main()
  56. {
  57.     print("\n----------------------------------");
  58.     print(" News Ticker/System by kelvinis");
  59.     print("----------------------------------\n");
  60. }
  61.  
  62. #endif
  63.  
  64. public OnPlayerConnect(playerid)
  65. {
  66.     TextDrawShowForPlayer(playerid, Ntick);
  67.     return 1;
  68. }
  69.  
  70. public OnPlayerDisconnect(playerid, reason)
  71. {
  72.     TextDrawHideForPlayer(playerid, Ntick);
  73.     return 1;
  74. }
  75.  
  76. public Nupdate ()
  77. {
  78. static Number = 0;
  79. TextDrawSetString(Ntick, news[Number++]);
  80. TextDrawShowForAll(Ntick);
  81. if(Number == sizeof(news)) Number = 0;
  82. return 1;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement