you can use this
Code:
stock ScreenFade(plr, Float:fDuration, red, green, blue, alpha)
{
new i = plr ? plr : get_maxplayers();
if( !i )
{
return 0;
}
message_begin(plr ? MSG_ONE : MSG_ALL, get_user_msgid( "ScreenFade"), {255, 255, 0}, plr);
write_short(floatround(4096.0 * fDuration, floatround_round));
write_short(floatround(4096.0 * fDuration, floatround_round));
write_short(4096);
write_byte(red);
write_byte(green);
write_byte(blue);
write_byte(alpha);
message_end();
return 1;
}
exapmle
Code:
ScreenFade(id, 5.0, 255, 255, 0, 0)