Advertisement
Misa_R3FL3X

Untitled

Feb 18th, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. stock ChatColor( const id, const szStr[ ], any:... )
  2. {
  3. new szMsg[ 191 ], iPlayers[ 32 ], iCount = 1;
  4.  
  5. vformat( szMsg, sizeof szMsg - 1, szStr, 3 )
  6.  
  7. replace_all( szMsg, 190, "!g", "^4" )
  8. replace_all( szMsg, 190, "!y", "^1" )
  9. replace_all( szMsg, 190, "!t", "^3" )
  10.  
  11. if( id )
  12. iPlayers[ 0 ] = id;
  13. else
  14. get_players( iPlayers, iCount, "ch" )
  15.  
  16. for( new i = 0 ; i < iCount ; i++ )
  17. {
  18. if( is_user_connected( iPlayers[ i ] ) )
  19. {
  20. message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, iPlayers[ i ] )
  21. write_byte( iPlayers[ i ] )
  22. write_string( szMsg )
  23. message_end( )
  24. }
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement