Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define MAX_MESSAGES 9000
- #define BOTTIMER 120000 // <-Set the timer lengh here (60000 = 1 min)
- #define COLOR_BOT 0xFF0000AA // <- set the color here
- new botname[16] = "Penis_Ripper"; //<- set the name here
- new RandomMessages = 1; // 1 = on; 0 = off ( 0 = only SendBotMessage() without Randommessages )
- new max_msg;
- new BotMessages[MAX_MESSAGES][500];
- public OnFilterScriptInit()
- {
- if(RandomMessages == 1)
- {
- SetTimer("SendRandomMessage",BOTTIMER,1);
- }
- //Examples
- AddRandomMessage("Hello & How Are You today?, Did You Know i'm a ChatBot? ");
- AddRandomMessage("Here is our Backup Forums ");
- AddRandomMessage("Please Register @ both Forum sites");
- AddRandomMessage("You Can Apply To Join A Faction or Create a Gang");
- AddRandomMessage("Remember To Use The Right Format Or Else it Will Get Denied");
- AddRandomMessage("The Server Owner Is Steven_Ramos & Server Co-Owner is Brian_Wong");
- AddRandomMessage("Don't Vandalize The Server Or Esle You Can Get Demoted - Fired(Staff)");
- AddRandomMessage("Don't Ask For A Promotion Or Esle Your Getting Demoted (Staff)");
- AddRandomMessage("Don't Ask For Admin , Ca ,Server Mod Or Else You Not Getting It");
- AddRandomMessage("Make Sure To Always Follow Server & Forum Rules");
- AddRandomMessage("Use /b & /o to Chat To Avoid Meta Gaming");
- AddRandomMessage("Donate To The Server To Become A VIP");
- AddRandomMessage("Always Respect Community Advisors & Server Moderators & Admins");
- AddRandomMessage("We Don't Refund Ca,Server Mod & Admin & VIP");
- AddRandomMessage("Add 68.9.134.228:7777 To Your Favorites list");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- //Example
- SendBotMessage("Welcome to Ultimate-Roleplay. Read the /rules or Else Il Rip Your Penis Off");
- return 1;
- }
- forward SendRandomMessage();
- public SendRandomMessage()
- {
- for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
- {
- if(IsPlayerConnected(playerid)==1 && GetPlayerColor(playerid) != 0)
- {
- new name[20];
- format(name,sizeof(name),"%s",PlayerName(playerid));
- new ColorSave = GetPlayerColor(playerid);
- SetPlayerColor(playerid,COLOR_BOT);
- SetPlayerName(playerid,botname);
- SendPlayerMessageToAll(playerid,BotMessages[random(max_msg)]);
- SetPlayerColor(playerid,ColorSave);
- SetPlayerName(playerid,name);
- return 1;
- }
- }
- return 1;
- }
- forward SendBotMessage(msg[]);
- public SendBotMessage(msg[])
- {
- for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
- {
- if(IsPlayerConnected(playerid)==1 && GetPlayerColor(playerid) != 0)
- {
- new name[20];
- format(name,sizeof(name),"%s",PlayerName(playerid));
- new ColorSave = GetPlayerColor(playerid);
- SetPlayerColor(playerid,COLOR_BOT);
- SetPlayerName(playerid,botname);
- SendPlayerMessageToAll(playerid,msg);
- SetPlayerColor(playerid,ColorSave);
- SetPlayerName(playerid,name);
- return 1;
- }
- }
- return 1;
- }
- stock AddRandomMessage(msg[])
- {
- format(BotMessages[max_msg],500,"%s",msg);
- max_msg++;
- return 1;
- }
- stock PlayerName(playerid)
- {
- new name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name2, MAX_PLAYER_NAME);
- return name2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement