Raised This Month: $ Target: $400
 0% 

Request plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Niceone
Junior Member
Join Date: Apr 2015
Old 05-13-2015 , 10:33   Request plugin
Reply With Quote #1

hi
can someone make plugin to stop all map sounds for all players ?
like : Rain Sound , Thunder Sound , snow Sound etc..

Example : In each round the plugin write in all players console that command (stopsound)
Niceone is offline
RaZ_HU
Senior Member
Join Date: May 2015
Location: Hungary
Old 05-13-2015 , 15:06   Re: Request plugin
Reply With Quote #2

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_cmd0"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_cmd0"cl_weather 0" );
    
    return 
PLUGIN_CONTINUE


Last edited by RaZ_HU; 05-13-2015 at 15:21.
RaZ_HU is offline
Niceone
Junior Member
Join Date: Apr 2015
Old 05-13-2015 , 15:42   Re: Request plugin
Reply With Quote #3

Quote:
Originally Posted by RaZ_HU View Post
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_cmd0"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_cmd0"cl_weather 0" );
    
    return 
PLUGIN_CONTINUE

omg this exactly what I need
Nice work bro working 100%
thank you so much.
Niceone is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode