Advertisement
IdoGame

Auto Restart for public

Nov 9th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define Minutes 30
  5. new Min
  6. new const Tag[] = "[Amxx]"
  7. public plugin_init()
  8. {
  9. register_plugin("rs", "97056", "xflane")
  10. set_task(60.0,"Minute",_,_,_,"b")
  11. Min = Minutes;
  12. }
  13. public Minute()
  14. {
  15.  
  16. Min--;
  17. client_print(0,print_chat,"%s Time Left To Restart %i",Tag,Min)
  18.  
  19. if(Min == 0)
  20. {
  21. Min -= 1;
  22. client_print(0,print_chat,"%s Restarting Server",Tag)
  23. set_task(3.0,"Restart")
  24. }
  25. }
  26. public Restart()
  27. {
  28. server_cmd("restart")
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement