Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp> //Main include
- //=============================================================================================|
- // |
- // |
- // ______ |
- // | { | | |
- // | { (____________ | | |
- // | { ( | ___ | |
- // | { { } ( __________ | / \ | Server |
- // | } ( | | / \ | & |
- // | } ( | | / \ | Community |
- // | ______} { _________| | / \ | |
- // |____________ | / \ | |
- // |/ \ | |
- //=============================================================================================
- //=============================================================================================
- #define CURRENT_MESSAGES 9
- //This is the number of the messages ^ Make sure its corret AT ALL TIMES!
- #define MESSAGE_COLOR 0x4169E1FF
- //The color of the messages ^ You can change it
- #define MESSAGE_TIME 70
- //These are the seconds in which every message is sent ^
- new RM[CURRENT_MESSAGES][128];
- forward SendRandomMessage();
- public OnFilterScriptInit()
- {
- print("\n------------------------------------------");
- print(" Hope you enjoy");
- print(" Random Messages In Your server,");
- print(" >>| MADE BY CHRONIC, Bitch dont change it|<<.");
- print("--------------------------------------------\n");
- AddRandomMessage("Your msg here");
- AddRandomMessage("Your msg here");
- AddRandomMessage("Your msg here");
- AddRandomMessage("Your msg here ");
- AddRandomMessage("Your msg here ");
- AddRandomMessage("Your msg here");
- AddRandomMessage("Your msg here");
- AddRandomMessage("Your msg here");
- AddRandomMessage("Your msg here");
- SetTimer("SendRandomMessage", MESSAGE_TIME * 1000, 1);
- return 1;
- }
- public SendRandomMessage()
- {
- static lastmessage = 0;
- new rand = random(CURRENT_MESSAGES);
- while(rand == lastmessage && CURRENT_MESSAGES != 1) { rand = random(CURRENT_MESSAGES); }
- lastmessage = rand;
- SendClientMessageToAll(MESSAGE_COLOR, RM[lastmessage]);
- }
- stock AddRandomMessage(text[])
- {
- for(new m; m < CURRENT_MESSAGES; m++)
- {
- if(!strlen(RM[m]))
- {
- strmid(RM[m], text, 0, 127);
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement