This is a working script, but with opened nightvision it's very hard to see this BRIGHTLIGHT, try to use another effect:
PHP Code:
#include < amxmodx >
#include < fakemeta >
#define VERSION "1.0"
new g_iNvg[ 33 ]
public plugin_init()
{
register_plugin( "Brightlight", VERSION, "Hunter-Digital" )
register_event( "NVGToggle", "EventNvgToggle", "be" )
register_forward( FM_AddToFullPack, "ForwardAddToFullPackPost", 1 )
}
public EventNvgToggle( id )
g_iNvg[ id ] = read_data( 1 )
public ForwardAddToFullPackPost( es_handle, e, ent, host, hostflags, player, pSet )
{
if ( !player || !is_user_alive( host ) || !g_iNvg[ host ] )
return FMRES_IGNORED
if ( ent != host )
set_es(es_handle, ES_Effects, EF_BRIGHTLIGHT )
return FMRES_IGNORED
}