My first try, how about this one?
PHP Code:
#include <amxmodx>
#define PLUGIN_NAME "Ambient Stop"
#define PLUGIN_VERSION "0.2"
#define PLUGIN_AUTHOR "RaZ_HU"
new ambient_weather_effect = 1;
new ambient_stopsound = 0;
public plugin_init()
{
register_plugin("PLUGIN_NAME "," PLUGIN_VERSION","PLUGIN_AUTHOR")
register_logevent( "EventRoundStart", 2, "1=Round_Start" );
register_cvar("ambient_stopsound", "0" );
register_cvar("ambient_weather_effect", "1" );
return PLUGIN_CONTINUE
}
public EventRoundStart( )
{
// Execute stopsound command on every roundstart if ambient_stopsound is 1
// Default value is 0 - so it won't touch the cvar
if(ambient_stopsound == 1)
client_cmd( 0, "stopsound" );
// Execute cl_weather 0 command if ambient_weather_effect is 0
// Default value is 1 - so it won't touch the cvar
if(ambient_weather_effect == 0)
client_cmd( 0, "cl_weather 0" );
return PLUGIN_CONTINUE
}