/// <summary> /// This function prints all the messages in an array of string to a client. /// It sends a message in order to do so. /// </summary> /// <param name="player"> /// Player <see cref="Player"/> /// </param> /// <param name="text"> /// Array of string <see cref="System.String[]"/> /// </param> public static void ClientPrint(this Player player, string[] text) { foreach (string line in text) { player.ClientPrint(line); } }
/// <summary> /// Splits the string in an array (determines boundaries by \n and \r) and prints each string /// </summary> /// <param name="player"> /// Player <see cref="Player"/> /// </param> /// <param name="text"> /// String with \r and \n for line determination. <see cref="System.String"/> /// </param> public static void ClientPrintEachLine(this Player player, string text) { player.ClientPrint(text.Split(new char[] {'\n', '\r'})); }