PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
enum eSettings {
bTime[ 32 ],
bMap[ 32 ]
}
new const g_szSettings[ 2 ][ eSettings ] =
{
{ "07:00:00", "de_dust2" },// Disable plugin
{ "06:00:00", "de_dust" } //Enable plugin
}
new const szModFiles[ ][ ] = { "file1.amxx", "file2.amxx", "file3.amxx", "file4.amxx", "file5.amxx" }
public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR )
for( new i = 0; i < charsmax( szModFiles ) ; i++ )
{
if( ActivateMod( g_szSettings[ 0 ][ bTime ] ) )
{
if( pause( "cd", szModFiles[ i ] ) )
{
log_amx( "%s has been stopped!", szModFiles[ i ] )
server_cmd( "amx_map %s", g_szSettings[ 0 ][ bMap ] )
}
}
else if( ActivateMod( g_szSettings[ 1 ][ bTime ] ) )
{
if( unpause( "cd", szModFiles[ i ] ) )
{
log_amx( "%s has been started!", szModFiles[ i ] )
server_cmd( "amx_map %s", g_szSettings[ 1 ][ bMap ] )
}
}
}
}
bool:ActivateMod( const szDate[ ] )
{
return get_systime( ) >= parse_time( szDate, "%H:%M:%S" );
}
__________________