yes as snow says that would be the best, but a simple way, thats easy could be like this:
PHP Code:
#include <amxmodx>
#include <zombieplague>
new g_msgScreenFade, cvar_toggle, cvar_humanos, cvar_zombies, cvar_rounddraw
new cvar_color_one
new cvar_color_two
new cvar_color_three
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")
cvar_color_one = register_cvar("zp_screenfade_color_one", "0")
cvar_color_two = register_cvar("zp_screenfade_color_two", "0")
cvar_color_three= register_cvar("zp_screenfade_color_three", "256")
}
public zp_round_ended(winteam)
{
if (get_pcvar_num(cvar_toggle))
{
if ((get_pcvar_num(cvar_humanos)) && winteam == WIN_HUMANS)
{
screenfade(get_pcvar_num(cvar_color_one), get_pcvar_num(cvar_color_two), get_pcvar_num(cvar_color_three))
}
if ((get_pcvar_num(cvar_zombies)) && winteam == WIN_ZOMBIES)
{
screenfade(get_pcvar_num(cvar_color_one), get_pcvar_num(cvar_color_two), get_pcvar_num(cvar_color_three))
}
if ((get_pcvar_num(cvar_rounddraw)) && winteam == WIN_NO_ONE)
{
screenfade(get_pcvar_num(cvar_color_one), get_pcvar_num(cvar_color_two), get_pcvar_num(cvar_color_three))
}
}
}
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()
}
__________________