mam taki kod
#include <amxmodx>
#include <engine>
#define B_F 255
#define B_P 100
#define VOL_LOW 0.5
public plugin_precache() {
}
public ifflashed(id) {
new effect = read_data(7)
if (effect != B_F && effect != B_P) {
return PLUGIN_CONTINUE
}
Display_Fade(id,5,5,0x0001,255,255,255,255)
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("Flash", "1.0", "Dirr")
register_event("ScreenFade", "ifflashed", "be", "4=255", "5=255", "6=255", "7>199")
}
stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha)
{
static msgScreenFade;
if( !msgScreenFade ) msgScreenFade = get_user_msgid("ScreenFade")
message_begin( !id ? MSG_ALL : MSG_ONE, msgScreenFade,{0,0,0},id );
write_short( (1<<12) * duration ); // Duration of fadeout
write_short( (1<<12) * holdtime ); // Hold time of color
write_short( fadetype ); // Fade type
write_byte ( red ); // Red
write_byte ( green ); // Green
write_byte ( blue ); // Blue
write_byte ( alpha ); // Alpha
message_end();
}
Jak zrobić by kolorowy ekran był tylko widoczny dla rzucającego ?
Użytkownik Dirr edytował ten post 07.05.2017 02:21


Dodatki SourceMod














