CsGzone-forum.MyForum.ro Forum Index
Register • Search • FAQ • Memberlist • Usergroups • Log in
Server Restarter [AmxModX]

 
Reply to topic    CsGzone-forum.MyForum.ro Forum Index » Pluginuri View previous topic
View next topic
Server Restarter [AmxModX]
Author Message
Marse
Administrator
Administrator


Joined: 03 Oct 2007
Posts: 58

Post Server Restarter [AmxModX] Reply with quote
Server Restarter AMXMODX Plugin

Code-ul pluginului :
Code:
/* Server Restarter AMX MOD X Plugin

* Author : SAMURAI
* Version : 0.1

* Detalii : Cu acest plugin activat la server, serverul se va restarta din 24 in 24 de ore
  Este tare folositor in caz de aveti server cu Psychostats sau ceva care face loguri
  De asemenea este folositor si in cazul in care aveti un server la care jucatorii
au in top peste 5000 de fraguri pentru a nu face lag

* NFO : Va trebuie AMX MOD X 1.60 sau mai nou


*/

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Server Restarter"
#define VERSION "0.1"
#define AUTHOR "SAMURAI"


new p_Plugin
new p_time

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   p_Plugin = register_cvar("amx_restarter","1")
   p_time = register_cvar("amx_restart_time","1")
}


public srvrestart()
{
   if(get_pcvar_num(p_Plugin))
   {
   
   set_task(86400.0, "willrestart",_,_,_,_,_)
          }
   return PLUGIN_HANDLED
   
}
   
   
public willrestart()
{
   
   if(get_pcvar_num(p_time))
   
   {
    server_cmd("restart")
   
   return
          }
}

03/10/2007 18:58 View user's profile Send private message Send e-mail
Display posts from previous:    
Reply to topic    CsGzone-forum.MyForum.ro Forum Index » Pluginuri All times are GMT + 3 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro