Esempio n. 1
0
        /// <summary>
        /// Prints some colored text in the chat (yellow, green, special).
        /// You can choose the special color in this Version (A fake teammessage is send to the client and afterwards
        /// the information is restored).
        /// </summary>
        /// <param name="player">
        /// A player <see cref="Player"/>
        /// </param>
        /// <param name="specialColor">
        /// The SpecialColor you want to send <see cref="SpecialColor"/>
        /// </param>
        /// <param name="text">
        /// The text you want to send, you can use C#-style arguments like {0} <see cref="System.String"/>
        /// </param>
        /// <param name="paramlist">
        /// The additional parameterlist. <see cref="System.Object[]"/>
        /// </param>
        public static void ClientColorPrint(this Player player, SpecialColor specialColor, string text, params object[] paramlist)
        {
            // TODO: for some reason this doesn't work, thought the messages come in a proper way
            string team = player.GetTeamString();

            player.SendTeamInfoMessage(CounterStrike.GetTeamString(specialColor));
            player.ClientColorPrint(text, paramlist);
            player.SendTeamInfoMessage(team);
        }
Esempio n. 2
0
 public static void SendTeamInfoMessage(this Player player, Player playerTeamChange, Team team)
 {
     player.SendTeamInfoMessage(playerTeamChange, CounterStrike.GetTeamString(team));
 }
Esempio n. 3
0
 public static SpecialColor GetTeamColor(this Player player)
 {
     return(CounterStrike.GetTeamColor(player.GetTeamID()));
 }
Esempio n. 4
0
 public static string GetTeamString(this Player player)
 {
     return(CounterStrike.GetTeamString(player.GetTeamID()));
 }