Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP 5.0] Automatic Light Changer


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 06-04-2012 , 09:45   Re: [ZP 5.0] Automatic Light Changer
Reply With Quote #6

Quote:
Originally Posted by naSTR View Post
Can someone make it in zp4.3???
Learn its simple.
PHP Code:
#include <amxmodx>
#include <colorchat>

#define PLUGIN "[ZP] Automatic light change"
#define VERSION "1.0"
#define AUTHOR "lambda"

new counter
new const num_to_flag[4][] = { "d","c","b","a" }

new 
cvar_enabled

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
counter = -20 random_num(010)
    
    
cvar_enabled register_cvar("zp_autolight_enable""1")
}

public 
event_round_start()
{
    
counter++

    if (
get_pcvar_num(cvar_enabled))
    {
        if(
counter sizeof(num_to_flag) && counter >= )
        {
            
set_cvar_string("zp_lighting"num_to_flag[counter])
            
            switch(
counter)
            {
                case 
0:
                    
ColorChat(0TEAM_COLOR"^4[ZP]^1 It's starting to get dark...")
                case 
1:
                    
ColorChat(0TEAM_COLOR"^4[ZP]^1 It's better to get inside...")
                case 
2:
                    
ColorChat(0TEAM_COLOR"^4[ZP]^1 Beware of the dark...")
                case 
3:        
                    
ColorChat(0TEAM_COLOR"^4[ZP]^1 It's midnight.")
            }

        }
    }

__________________
H.RED.ZONE 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 16:15.


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