Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ********************************************************************************
- AUTOMATIC HOSTNAME CHANGER
- Author: Plugy
- Made: ---, 2010.
- ********************************************************************************
- */
- #define COLOR_BLUE 0x1229FAFF
- #define FILTERSCRIPT
- ////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- ////////////////////////////////////////////////////////////////////////////////
- new Timer0;
- new Timer1;
- new Timer2;
- ////////////////////////////////////////////////////////////////////////////////
- forward autohostname0();
- forward autohostname1();
- forward autohostname2();
- ////////////////////////////////////////////////////////////////////////////////
- public OnFilterScriptInit()
- {
- print("\n-----------------------------------");
- print("AUTOMATIC HOSTNAME CHANGER ");
- print("************************ ");
- print("by Plugy aka Plugsttzzx! ");
- print("-----------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- //Automaticly Hostname Changer System
- public autohostname0()
- {
- KillTimer(Timer0);
- Timer0 = SetTimer("autohostname1",1400,false);
- SendRconCommand("hostname NAME 1");//Change "NAME 1" as example your Custom Hostname Text
- return 1;
- }
- public autohostname1()
- {
- KillTimer(Timer1);
- Timer1 = SetTimer("autohostname2",1400,false);
- SendRconCommand("hostname NAME 2");//Change "NAME 2" as example your Custom Hostname Text
- return 1;
- }
- public autohostname2()
- {
- KillTimer(Timer2);
- Timer2 = SetTimer("autohostname0",1400,false);
- SendRconCommand("hostname NAME 3");//Change "NAME 3" as example your Custom Hostname Text
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- //To activate Automaticly Hostname changer of server
- if(strcmp(cmdtext, "/autohostname", true) == 0 && IsPlayerAdmin(playerid))
- {
- Timer0 = SetTimer("autohostname1",1400,false);
- KillTimer(Timer1);
- KillTimer(Timer2);
- SendClientMessage(playerid, COLOR_BLUE, "You activated Auto-Hostname Changer!");
- return true;
- }
- //To de-activate Automaticly Hostname changer of server
- if(strcmp(cmdtext, "/unautohostname", true) == 0 && IsPlayerAdmin(playerid))
- {
- KillTimer(Timer0);
- KillTimer(Timer1);
- KillTimer(Timer2);
- SendClientMessage(playerid, COLOR_BLUE, "You de-activated Auto-Hostname Changer!");
- return true;
- }
- return 0;
- }
- ////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////// CREDITS TO PLUGY ///////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement