Guest User

Whatcha

a guest
Dec 2nd, 2010
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.33 KB | None | 0 0
  1. #define COLOR_RED 0xAA3333AA
  2. #define FILTERSCRIPT
  3.  
  4. #include <a_samp>
  5.  
  6. new Timer0;
  7.  
  8. forward a0(playerid);
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.         print("\n-----------------------------------");
  13.         print("Automatic Restarter                  ");
  14.         print("-----------------------------------  ");
  15.         print("by Rokzlive aka Whatcha              ");
  16.         print("-----------------------------------\n");
  17.         return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.         return 1;
  23. }
  24.  
  25. public a0(playerid)
  26. {
  27.     KillTimer(Timer0);
  28.     Timer0 = SetTimer("a0",600000,false);
  29.     SendRconCommand("hostname SERVER NAME HERE!!!!!");//Replace SERVER NAME HERE!!!!! With Your Server Name
  30.     SendRconCommand("say SERVER RESTARTING!");
  31.     SendRconCommand("gmx");
  32.     KillTimer(Timer0);
  33.     return 1;
  34. }
  35.  
  36. public OnPlayerCommandText(playerid, cmdtext[])
  37. {
  38.         if(strcmp(cmdtext, "/restart", true) == 0 && IsPlayerAdmin(playerid))
  39.     {
  40.              Timer0 = SetTimer("a0",600000,false);
  41.              SendClientMessage(playerid, COLOR_RED, "SYSTEM: Restarting in 10 minutes!");
  42.              SendRconCommand("say SERVER RESTARTING IN 10 MINUTES!");
  43.              SendRconCommand("hostname SERVER NAME HERE!!!!! [Pending Restart!]");//Replace SERVER NAME HERE!!!!! With Your Server Name
  44.              return true;
  45.     }
  46.         return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment