Hello all !
I'm new here, and I'm new with C#, I usually code in JS with React and Node for the web.
So I have a question, I would like to do just a little thing.
I want to replace the message of player onPlayerChat.
I have make a code like this :
private object OnPlayerChat(BasePlayer player, string message, Chat.ChatChannel channel) {
if(message.Equals("test")) {
player.ChatMessage($"<color=#e74c3c>[Joueur]</color><color=#aaa69d> ->{player.displayName}</color> {message}");
return true;
}
return null;
}
But just the player who send the message see the message, and I want what this message are see on a globalchat ?
And, it the same thing for that :
player.SendConsoleCommand("chat.add", 2, 76561############, $"<color=#e74c3c>ReaperBot</color><color=#aaa69d> -></color> [INFOS] Le wipe a démarré le Jeudi 19/11 à 20h et était un BP Wipe.");Just the player who send the message see the message. How can I do to see this message in a global chat ?
Thank you,
Good day