Raised This Month: $ Target: $400
 0% 

Request plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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