public static void SendToAllBut(Players.Player ply, string message, ChatColor color = ChatColor.white, ChatStyle style = ChatStyle.normal, Pipliz.Chatting.ChatSenderType sender = Pipliz.Chatting.ChatSenderType.Server) { string messageBuilt = BuildMessage(message, color, style); Pipliz.Chatting.Chat.SendToAllBut(ply, messageBuilt, sender); }
public static void SendThrottle(Players.Player ply, string message, ChatColor color = ChatColor.white, ChatStyle style = ChatStyle.normal, Pipliz.Chatting.ChatSenderType sender = Pipliz.Chatting.ChatSenderType.Server) { if (CanSendMesssage(ply)) { string messageBuilt = BuildMessage(message, color, style); Pipliz.Chatting.Chat.Send(ply, messageBuilt, sender); _nextSendTime[ply] = Time.SecondsSinceStartDouble + 10; } }
public static void sendToAll(string message, ChatColour colour = ChatColour.white, ChatStyle style = ChatStyle.normal, Pipliz.Chatting.ChatSenderType sender = Pipliz.Chatting.ChatSenderType.Server) { string messageBuilt = buildMessage(message, colour, style); Pipliz.Chatting.Chat.SendToAll(messageBuilt, sender); }
public static void sendAllSilent(string message, ChatColour colour = ChatColour.white, ChatStyle style = ChatStyle.normal, Pipliz.Chatting.ChatSenderType sender = Pipliz.Chatting.ChatSenderType.Server) { ChatSenderType type = ChatSenderType.Server; string messageBuilt = buildMessage(message, colour, style); using (ByteBuilder byteBuilder = ByteBuilder.Get()) { byteBuilder.Write((ushort)ClientMessageType.Chat); byteBuilder.Write((byte)type); byteBuilder.Write(messageBuilt); Players.SendToAll(byteBuilder.ToArray(), NetworkMessageReliability.ReliableWithBuffering); } }
public static void sendSilent(Players.Player player, string message, ChatColour colour = ChatColour.white, ChatStyle style = ChatStyle.normal, Pipliz.Chatting.ChatSenderType sender = Pipliz.Chatting.ChatSenderType.Server) { ChatSenderType type = ChatSenderType.Server; if (!(player.ID == NetworkID.Server)) { string messageBuilt = buildMessage(message, colour, style); using (ByteBuilder byteBuilder = ByteBuilder.Get()) { byteBuilder.Write((ushort)ClientMessageType.Chat); byteBuilder.Write((byte)type); byteBuilder.Write(messageBuilt); NetworkWrapper.Send(byteBuilder.ToArray(), player, NetworkMessageReliability.ReliableWithBuffering); } } //send(player, message, colour, style, sender); }