I've changed the way of original '
Colored Flashbangs' plugin by v3x.
It works fine under windows. But under linux, I always get this error when someone/bot connects the server :
Code:
FATAL ERROR (shutting down): WRITE_SHORT called with no active message
Code:
public plugin_init()
{
register_plugin( Plugin, Version, Author );
register_message( get_user_msgid( "ScreenFade" ), "m_ScreenFade" );
}
public m_ScreenFade( msg_id, msg_type, msg_entity )
{
if ( is_user_bot( msg_entity ) )
return;
if ( get_msg_arg_int( 4 ) != 255 || get_msg_arg_int( 5 ) != 255 || get_msg_arg_int( 6 ) != 255 )
return;
set_msg_arg_int( 4, ARG_BYTE, random_num( 1, 255 ) );
set_msg_arg_int( 5, ARG_BYTE, random_num( 1, 255 ) );
set_msg_arg_int( 6, ARG_BYTE, random_num( 1, 255 ) );
}
I really don't get why it's crashing only under linux.
( I've tested without others plugins )
Thanks in advance.
__________________