Change chat icon for specific playersNo Thanks
I've added code to only send the Welcomer disconnect message to a select group of users determined by umod group membership but now cannot figure out how to duplicate the custom icon functionality from Server.Broadcast

        private void BroadcastLeft(string message, ulong playerId, params object[] args)
        {
            foreach (var player in players.Connected) {
              if (player.BelongsToGroup("customgroup")) {
                player.Message(message, null, playerId);
              }
            }
        }
​
This works but I don't know what to put into or replace player.Message(message, null, playerId); so I can customize the icon. All the examples I've found were not helpful or my search fu is bad
You're trying to use a universal method, which does not provide the Rust-specific handling for chat icons. You'd need to send the message directly using Rust's code else use an older, deprecated method such as Player.Message or something.
Thought so, I did find several mentions of using something like
rust.SendChatMessage(player, message, null, playerId);​

but couldn't find any way to get past the "rust not declared" kind of message regardless of any "using" statement. Some plugins that seem to have not been updated in a couple of years had this construct but I couldn't get the code transplanted

That is one of the ancient methods, which there are many universal and newer methods for. Your plugin would have to be set as a RustPlugin to use that.

"which there are many universal and newer methods for" -- that's not exactly correct is it, because the newer methods do not support the goal I have here of adjusting the player chat icon in Rust

Ok, so I'm late to this party I guess, and I can see the move to CovalencePlugin. And with your labeling of those Rust functions as ancient, does that mean umod future direction is to ignore the particularities of an individual game and only support a superset common among all the games?

Merged post

Oh yeah, I had flipped it to Covalence for testing to get access to the list of connected players but I suppose I should switch it back to RustPlugin and get the list of connected players that way
Player.Message is newer and supports the chat icon. Both your example and that are being removed though.
Got it working to send disconnect messages to only one oxide group and also including the customized icon. Guess I'll have to watch out for future breaking changes. Thanks for your help
Locked automatically