i have this plugin
PHP Code:
#include <amxmodx>
#include <zombieplague>
new g_msgScreenFade, cvar_toggle, cvar_humanos, cvar_zombies, cvar_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(0, 0, 255)
}
if ((get_pcvar_num(cvar_zombies)) && winteam == WIN_ZOMBIES)
{
screenfade(255, 0, 0)
}
if ((get_pcvar_num(cvar_rounddraw)) && winteam == WIN_NO_ONE)
{
screenfade(0, 255, 0)
}
}
}
public screenfade(red, green, blue)
{
message_begin(MSG_BROADCAST, g_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
__________________