Sma:
- Código:
#include < amxmodx >
#pragma semicolon 1
#define PLUGIN "Reset Stats On New Month"
#define VERSION "0.0.1"
#define cm(%0) ( sizeof(%0) - 1 )
public plugin_init()
{
register_plugin( PLUGIN, VERSION, "ConnorMcLeod" );
}
public plugin_cfg()
{
new month[32], lastmonth[32];
get_vaultdata("lastmonth", lastmonth, cm(lastmonth));
get_time("%B", month, cm(month));
if( !lastmonth[0] )
{
copy(lastmonth, cm(lastmonth), month);
}
if( !equal(lastmonth, month) )
{
set_vaultdata("lastmonth", month);
set_cvar_num("csstats_reset", 1);
server_cmd("restart");
}
}