Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- forward Nupdate ();
- new Ntimer;
- new Text:Ntick;
- new news[][] =
- {
- "News_Line_1", "News_Line_2", "News_Line_3"
- };
- //Adding a new line:
- //You can add a new line by adding a "," behind the Last Line. Then add "Your_text_here".
- //WARNING: Use "_" As a Space! otherwise it will Skip everything!!!
- public OnFilterScriptInit()
- {
- Ntimer = SetTimer("Nupdate", 5000, 1);
- print("\n--------------------------------------");
- print(" News Ticker/System by Nysteri ");
- print(" LOADED ");
- print("--------------------------------------\n");
- Ntick = TextDrawCreate(321.000000,435.000000,"Your News here");
- TextDrawUseBox(Ntick,1);
- TextDrawBoxColor(Ntick,0x00000099);
- TextDrawTextSize(Ntick,0.000000,631.000000);
- TextDrawAlignment(Ntick,2);
- TextDrawBackgroundColor(Ntick,0x000000ff);
- TextDrawFont(Ntick,3);
- TextDrawLetterSize(Ntick,0.399999,1.100000);
- TextDrawColor(Ntick,0xffffffff);
- TextDrawSetOutline(Ntick,1);
- TextDrawSetProportional(Ntick,1);
- TextDrawSetShadow(Ntick,1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(Ntimer);
- print("\n--------------------------------------");
- print(" News Ticker/System by Nysteri ");
- print(" UNLOADED ");
- print("--------------------------------------\n");
- TextDrawDestroy(Ntick);
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" News Ticker/System by Nysteri ");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0xFFE0C1FF, "This server is running \"News Ticker\" By Nibblet!");
- TextDrawShowForPlayer(playerid, Ntick);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid, Ntick);
- return 1;
- }
- public Nupdate ()
- {
- static Number = 0;
- TextDrawSetString(Ntick, news[Number++]);
- TextDrawShowForAll(Ntick);
- if(Number == sizeof(news)) Number = 0;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement