Raised This Month: $ Target: $400
 0% 

Plugin not working after restart


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 08-28-2007 , 08:15   Re: Plugin not working after restart
Reply With Quote #2

It doesn't work because your registering it as a CVAR and if you want amx_text to restart you shouldn't use it as a CVAR.

Try this:
PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "Restart"
#define VERSION "1.0"
#define AUTHOR "Blah"
 
public plugin_init()
{  
        
register_plugin(PLUGINVERSIONAUTHOR);
       
register_concmd("amx_restartserver""cmdrestart")
       
register_logevent("logevent_round_start"2"1=Round_Start");
    
}
public 
Round_Start()
{
        
set_task(2.5"auto_restart")
}
public 
auto_restart()
{
        
server_cmd("sv_restart 1");
}
public 
cmdrestart(id)
{
    
set_task(2.5"auto_restart")
    return 
PLUGIN_HANDLED

To restart just type in the console:
amx_restartserver
X-Script is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode