Sure, in the plugin's support thread.![]()
Using custom chat icons in Rust
Discussion in 'Guides and Tips' started by Wulf, Jun 12, 2015.
-
Wulf Community Admin
-
What's the best way to print to chat globally with a Steam profile as the Avatar? I can't seem to get one to reliably work. There's a lot of ways in older plugins but these all seem unreliable at best now.
-
rust.BroadcastChat(BasePlayer player, string name, string message, string userId)
Not 100% if that’s the correct arguments tbf.
The userId you supply is the steam avatar of the message. (Presuming the player is in the servers /users/ storage) -
-
Using custom chat icons in Rust
Where I can write this? I don't understand where I must write this line. -
It's code... Add it in your plugin code: Using custom chat icons in Rust
-
Is for example used in that "Player" library:
Code:// Oxide.Game.Rust.Libraries.Player public void Message(BasePlayer player, string message, string prefix, ulong userId = 0uL, params object[] args) { if (string.IsNullOrEmpty(message)) { return; } message = ((args.Length != 0) ? string.Format(Formatter.ToUnity(message), args) : Formatter.ToUnity(message)); string text = (prefix != null) ? (prefix + " " + message) : message; player.SendConsoleCommand("chat.add", new object[] { userId, text, 1.0 }); }
-
@Quantum
"It's code... Add it in your plugin code: Using custom chat icons in Rust"
Where I don't understand? I open all my plugins and put this code?
Stand alone? Like this?
Screenshot