Quote:
Originally Posted by romeo72
Hello Supremache,
now it worked !! Thank you very very much for the quick help!
I still have one question though. the zombie plague mod consists of an .amxx file that is active from 7 p.m. to 6 a.m.
but if I want to install a deatchmatch mod now, for example
a deathmatch server has several .amxx files:
csdm_equip.amxx
csdm_main.amxx
and so forth...
how can I solve that?
would be very grateful if you could help me again!
best regards
|
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new const StartTime[ ] = "07:00:00" /* Hour : Minute : Secound */
new const StopTime[ ] = "06:00:00"
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( StopTime ) )
{
if( pause( "cd", szModFiles[ i ] ) )
{
log_amx( "%s has been stopped!", szModFiles[ i ] )
}
}
else if( ActivateMod( StartTime ) )
{
if( unpause( "cd", szModFiles[ i ] ) )
{
log_amx( "%s has been started!", szModFiles[ i ] )
}
}
}
}
bool:ActivateMod( const szDate[ ] )
{
return get_systime( ) >= parse_time( szDate, "%H:%M:%S" );
}
__________________