Raised This Month: $ Target: $400
 0% 

help with screenfade


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 03-31-2009 , 09:34   help with screenfade
Reply With Quote #1

i have this plugin
PHP Code:
#include <amxmodx>
#include <zombieplague>

new g_msgScreenFadecvar_togglecvar_humanoscvar_zombiescvar_rounddraw

public plugin_init()
{
    
register_plugin("[ZP] ScreenFade""1.3""alan_el_more")
    
g_msgScreenFade get_user_msgid("ScreenFade")
    
cvar_toggle register_cvar("zp_screenfade""1")
    
cvar_humanos register_cvar("zp_screenfade_humanos""1")
    
cvar_zombies register_cvar("zp_screenfade_zombies""1")
    
cvar_rounddraw register_cvar("zp_screenfade_rounddraw""1")
}

public 
zp_round_ended(winteam)
{
    if (
get_pcvar_num(cvar_toggle))
    {
        if ((
get_pcvar_num(cvar_humanos)) && winteam == WIN_HUMANS
        {
            
screenfade(00255)
        }
        if ((
get_pcvar_num(cvar_zombies)) && winteam == WIN_ZOMBIES
        {
            
screenfade(25500)
        }
        if ((
get_pcvar_num(cvar_rounddraw)) && winteam == WIN_NO_ONE
        {
            
screenfade(02550)
        }
    }
}

public 
screenfade(redgreenblue)
{
    
message_begin(MSG_BROADCASTg_msgScreenFade)
    
write_short((1<<12)*4)
    
write_short((1<<12)*1)
    
write_short(0x0001
    
write_byte (red)
    
write_byte (green)
    
write_byte (blue)
    
write_byte (250)
    
message_end()

my questions are...
how do i determine the color of each screenfade with a cvar for each?
and
how do i that the color of screenfade is solid or opaque?

thanks in advance
__________________
alan_el_more 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 02:15.


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