Raised This Month: $ Target: $400
 0% 

[SOLVED] edit fog


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 10-09-2015 , 15:08   [SOLVED] edit fog
Reply With Quote #1

hi guys see this plugin

PHP Code:
#include <amxmodx>
#include <amxmisc>

new onoff,rgb2,density_cvar,r,g,b,g_density[4]
new 
bool:on

public plugin_init()

{
    
register_plugin("Advanced Fog","0.7","Sh!nE*")
    
onoff register_cvar("amx_fog_default","1")
    
rgb2 register_cvar("amx_fog_color","255 255 255")
    
density_cvar register_cvar("amx_fog_amount","1")
}

public 
set_fog2(id)

{
    if(
on || get_pcvar_num(onoff)) {
        new 
number[3],tempdens[4]
        if(
g_density[0] == && !on) {
            switch(
get_pcvar_num(density_cvar)) {
                case 
1:{tempdens[0]=3;tempdens[1]=58;tempdens[2]=111;tempdens[3]=18;}
                case 
2:{tempdens[0]=125;tempdens[1]=58;tempdens[2]=111;tempdens[3]=18;}
                case 
3:{tempdens[0]=27;tempdens[1]=59;tempdens[2]=66;tempdens[3]=96;}
                case 
4:{tempdens[0]=60;tempdens[1]=59;tempdens[2]=90;tempdens[3]=101;}
                case 
5:{tempdens[0]=68;tempdens[1]=59;tempdens[2]=90;tempdens[3]=101;}
                case 
6:{tempdens[0]=95;tempdens[1]=59;tempdens[2]=10;tempdens[3]=41;}
                case 
7:{tempdens[0]=125;tempdens[1]=59;tempdens[2]=111;tempdens[3]=18;}
                case 
8:{tempdens[0]=3;tempdens[1]=60;tempdens[2]=111;tempdens[3]=18;}
                case 
9:{tempdens[0]=19;tempdens[1]=60;tempdens[2]=68;tempdens[3]=116;}
            }
        }
        else {
            
tempdens[0] = g_density[0]
            
tempdens[1] = g_density[1]
            
tempdens[2] = g_density[2]
            
tempdens[3] = g_density[3]
        }
        if((
|| || 0) && on) {number[0] = r;number[1] = g;number[2] = b;} 
        else {
            new 
string[16],string2[3][4],i
            get_pcvar_string
(rgb2,string,15)
            
parse(string,string2[0],3,string2[1],3,string2[2],3)
            for(
i=0;3;i++) number[i] = str_to_num(string2[i])
            if(
number[0] < || number[0] > 255 || number[1] < || number[1] > 255 || number[2] < || number[2] > 255)
                
log_amx("WARNING: RGB has to be a number between 0 and 255.")
        }
        
message_begin(MSG_ONE,get_user_msgid("Fog"),{0,0,0},id)
        
write_byte(number[0])  // R
        
write_byte(number[1])  // G
        
write_byte(number[2])  // B
        
write_byte(tempdens[2]) // SD
        
write_byte(tempdens[3])  // ED
        
write_byte(tempdens[0])   // D1
        
write_byte(tempdens[1])  // D2
        
message_end()
    }

and this command
PHP Code:
set_task(0.1,"set_fog2",id
will running the fog
i want command to disable the fog help me guys

Last edited by arvEL.; 11-02-2015 at 00:51.
arvEL. is offline
Send a message via Skype™ to arvEL.
 



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 22:18.


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