Advertisement
Guest User

autorestart

a guest
May 2nd, 2015
1,279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <colorchat>
  3.  
  4. new auto_rround, rr_text;
  5.  
  6. public plugin_init()
  7. {
  8. register_plugin("Restart automat", "1.0", "StefaN@CSX");
  9. register_logevent("auto_restart", 2, "1=Round_End");
  10. rr_text = register_cvar("amx_rr_text","WWW.FIORIGINAL.RO/FORUM");
  11. }
  12.  
  13. public auto_restart(id)
  14. {
  15. auto_rround++;
  16.  
  17. if(auto_rround == 2)
  18. {
  19. new hostname [62], text[62];
  20. get_pcvar_string(rr_text, text, charsmax(text));
  21.  
  22. get_cvar_string("hostname", hostname, charsmax(hostname));
  23. server_cmd("sv_restart 1");
  24.  
  25. ColorChat(0, RED, "-==%s==-", hostname);
  26. ColorChat(0, RED, "-==%s==-", text);
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement