Allied Modders en español
Duda sobre flash de colores - Versión para impresión

+- Allied Modders en español (https://amxmodx-es.com)
+-- Foro: AMX Mod X - Scripting (https://amxmodx-es.com/Forum-AMX-Mod-X-Scripting)
+--- Foro: Scripting (https://amxmodx-es.com/Forum-Scripting)
+--- Tema: Duda sobre flash de colores (/Thread-Duda-sobre-flash-de-colores)



Duda sobre flash de colores - |-|Tuli|-| - 11/06/2019

hola, lo que queria saber es como puedo hacer para que no flashee de espalda?
osea que te haga el efecto normal de la flash cuando no te explota de frente
Código PHP:
//edit
public plugin_init()
{
    
register_plugin("Colored Flashbangs","1.0","v3x")
    
register_event("ScreenFade","FlashedEvent","be","4=255","5=255","6=255","7>199")
    
g_nMsgScreenFade get_user_msgid("ScreenFade")
    
// Cvars
    
register_cvar("amx_fb_mode""2")
    
register_cvar("amx_fb_r",    "25")
    
register_cvar("amx_fb_g",    "25")
    
register_cvar("amx_fb_b",    "25")
}
//
public FlashedEventid )
{
    new 
iMode get_cvar_num("amx_fb_mode")
    
    if (!
iMode) return 0;
    
    new 
iRed,iGreen,iBlue,iTeam get_user_team(id)
    
    switch( 
iMode )
    {
        case 
1:
        {
            
iRed =   get_cvar_num("amx_fb_r")
            
iGreen get_cvar_num("amx_fb_g")
            
iBlue =  get_cvar_num("amx_fb_b")
        }
        case 
2:
        {
            
iRed =   random_num(0,255)
            
iGreen random_num(0,255)
            
iBlue =  random_num(0,255)
        }
    }
    
    if ( !( 
iRed ) || !( iGreen ) || !( iBlue ))
    {
        
iRed =   255
        iGreen 
255
        iBlue 
=  255
    
}
    
message_beginMSG_ONE,g_nMsgScreenFade,{0,0,0},id )
    
write_shortiTeam != read_data) : )    // Duration
    
write_shortiTeam != read_data) : )    // Hold time
    
write_shortiTeam != read_data) : )    // Fade type
    
write_byte iRed )        // Red
    
write_byte iGreen )        // Green
    
write_byte iBlue )        // Blue
    
write_byte iTeam != read_data) : 255 )    // Alpha
    
message_end()
    
    return 
1;

de por si muchas graciass