Hi everyone, I'm trying to change the color of player names in chat. Unfortunately doing <color=#FFFF00>namehere</color> gets escaped and does not work. Has anyone successfully done this?
Thanks!
Colored names in chat
Discussion in 'Rust Development' started by Incisus, Feb 8, 2015.
-
Wulf Community Admin
What are you trying to color them with? It works fine, and is used by Rust and even Oxide itself for functions.
-
You'll need to create or request/pay for a custom plugin to do this.
-
[DOUBLEPOST=1423364407][/DOUBLEPOST]
Mind you it's been done in the following manner:
name = "<color=#A347FF>" .. name .. "</color>" -
Wulf Community Admin
-
I've been scouring all of the libraries and I'm not seeing a way.
The way I planned to do it was to change the base player display name, wrap it in HTML but as shown above it doesn't like this =(. -
Wulf Community Admin
-
-
Wulf Community Admin
-
Thanks for all of your help. -
To get the players steam icon you need to pass the players steamID within the chat broadcast. -
For anyone else looking for this, here is what I came up with (with the help of Wulf and Domestos):
Code:function PLUGIN:OnRunCommand(args) local player = args.connection.player if args.cmd.namefull == "chat.say" then local message = args:GetString(0, "text") if message ~= "" and message:sub(1, 1) ~= "/" then rust.BroadcastChat(self:GetNameWithColor(player.displayName, self:GetAuthLevel(player)), message, self:GetUserSteamID(player)) return true end end end
-
Thanks Incisus, been playing with making a plugin and that certainly explained a few questions I had about the chat system.
-
I'd be very interested in a plugin to change the white chat text. Nothing more annoying than having to look up to read stuff lol
-
-
-
No it's this auto announcer plugin:
http://oxidemod.org/plugins/auto-broadcast.684/
If notifier does the same job I could switch to that -
-