Hello, how I can replace the default chat icon?
Example Death Notes plugin (skull)
Solved Changing default message icons?
Discussion in 'Rust Development' started by s3r4, Jan 17, 2017.
-
Wulf Community Admin
-
I mean default message from server -
Wulf Community Admin
-
Can make a example?
- - -
Taking this opportunity, ask, how to get forum status "Server Owner"? -
Sorry to bring up an old post but how do you do this with oxide 2.0
Can you send me an example in C# that I would edit in the .cs please? -
Wulf Community Admin
Code:object OnServerMessage(string message) { if (message.Contains("nope")) return true; return null; }
-
Thank you for your reply Wulf
Just one quick question sorry but where would I change it for 'AutoBroadcast.cs'??
Cannot find that string anywhere in any of the .cs extensions... -
Wulf Community Admin
-
-
So can anyone help me change the server icons from the rust logo on "AutoBroadcast.cs" to my own steam logo?
Regards,
iHYPERLITE -
Code:
// Steam ID of the profile you want to use the icon from string ID = "76561198162931443"; object OnServerMessage(string message, string name, string color, ulong id) { // Loop through all connected players foreach(var player in BasePlayer.activePlayerList) // Send a message to all of the connected players with the new steam ID rust.SendChatMessage(player, name, message, ID); // Returning a value so it stops the original, unmodified message from being sent return true; }
-
Just one last question is this an individual plugin or do I place this bit of coding inside the AutoBroadcast.cs? -
Wulf Community Admin
-
Cheers again both of you, great help!