Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Filterscripta sukure Johurt(Edgaras) specialiai Gta-Online.lt
- Viskas daryta pagal wiki.sa-mp.com:
- http://wiki.sa-mp.com/wiki/SetTimer
- http://wiki.sa-mp.com/wiki/Random_Messages
- http://wiki.sa-mp.com/wiki/TextDrawCreate
- */
- #define FILTERSCRIPT
- #include <a_samp>
- #define KEITIMO_LAIKAS 5 // Laikas sekundese.
- #define TEXT_COLOR 0xFFFFFFFF // TextDraw'o spalva.
- forward SendMSG();
- new Text:Text;
- new timer;
- new RandomMSG[][] =
- {
- "Musu serverio svetaine: Gta-Online.lt",
- "Gta-Online.lt 2011 rinkimu rezultatai",
- "Draudziama registruotis daugiau, nei viena karta, be administracijos leidimo"
- };
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------------");
- print("[FS]jText by Johurt loaded.");
- print("--------------------------------------------\n");
- new randMSG = random(sizeof(RandomMSG));
- Text = TextDrawCreate(19.000000, 427.000000, RandomMSG[randMSG]);
- TextDrawBackgroundColor(Text, 255);
- TextDrawFont(Text, 2);
- TextDrawLetterSize(Text, 0.25, 0.70);
- TextDrawSetShadow(Text, 1);
- TextDrawColor(Text, TEXT_COLOR);
- TextDrawShowForAll(Text);
- timer = SetTimer("SendMSG", KEITIMO_LAIKAS * 1000, true);
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n----------------------------------------------");
- print("[FS]jText by Johurt unloaded.");
- print("----------------------------------------------\n");
- TextDrawDestroy(Text);
- KillTimer(timer);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawShowForPlayer(playerid, Text);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid, Text);
- return 1;
- }
- public SendMSG()
- {
- new randMSG = random(sizeof(RandomMSG));
- TextDrawSetString(Text, RandomMSG[randMSG]);
- TextDrawShowForAll(Text);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement