View Single Post
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 08-09-2022 , 06:28   Re: Reload a plugin every X seconds
Reply With Quote #7

Hello, for reload the plugin this should works
PHP Code:
#include <sourcemod>

#define TIMER_INTERVAL 300.0
#define PLUGIN_NAME "l4d2_meleemod2.2.1"

public void OnPluginStart()
{
    
CreateTimer(TIMER_INTERVALTimer_Reload_TIMER_REPEAT);
}

public 
Action Timer_Reload(Handle timer)
{
    
ServerCommand("sm plugins reload %s"PLUGIN_NAME);

You can change the define values and compile here.
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco