Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- enum _: Cvars
- {
- iTextPrefix
- }
- new pCvar[ Cvars ];
- public plugin_init()
- {
- pCvar[ iTextPrefix ] = register_cvar( "hnr_prefix", "Shoot`" );
- }
- stock ColorChat( const index, const string[], { Float, Sql, Resul,_ }:... )
- {
- new msg[ 191 ], players[ 32 ], count = 1, iPrefix[ 32 ];
- get_cvar_string( "hnr_prefix", iPrefix, charsmax( iPrefix ) );
- static len[ 3 ];
- len[ 0 ] = formatex( msg, charsmax( msg ), "^1[ ^4%s^1 ] ", iPrefix )
- len[ 1 ] = formatex( msg, charsmax( msg ), "^3[ ^4%s^3 ]^1 ", iPrefix )
- len[ 2 ] = formatex( msg, charsmax( msg ), "^4[ ^3%s^4 ]^1 ", iPrefix )
- new iRandom = random_num( len[ 0 ], len[ 2 ] );
- vformat( msg[ iRandom ], charsmax( msg ) - iRandom, string, 3 );
- if( index )
- players[ 0 ] = index;
- else
- get_players( players, count, "ch" );
- for( new i = 0; i < count; i++ )
- {
- if( !is_user_connected( players[ i ] ) )
- continue;
- message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
- write_byte( players[ i ] );
- write_string( msg );
- message_end( );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement