Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock ChatColor( const id, const szStr[ ], any:... )
- {
- new szMsg[ 191 ], iPlayers[ 32 ], iCount = 1;
- vformat( szMsg, sizeof szMsg - 1, szStr, 3 )
- replace_all( szMsg, 190, "!g", "^4" )
- replace_all( szMsg, 190, "!y", "^1" )
- replace_all( szMsg, 190, "!t", "^3" )
- if( id )
- iPlayers[ 0 ] = id;
- else
- get_players( iPlayers, iCount, "ch" )
- for( new i = 0 ; i < iCount ; i++ )
- {
- if( is_user_connected( iPlayers[ i ] ) )
- {
- message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, iPlayers[ i ] )
- write_byte( iPlayers[ i ] )
- write_string( szMsg )
- message_end( )
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement