is it still possible i tried this
void OnPlayerChat(ConsoleSystem.Arg arg)
{
arg.Args[0] = "<color=orange>" + arg.Args[0] + "</color>";
}
but doesnt work just shows it all in chat without the < / >, its becasue they removed the html ui i believe
Color in chat messages?
Discussion in 'Rust Development' started by ownprox, Feb 5, 2015.
-
Wulf Community Admin
You have to return the new arg still, and it will only apply to plugins loaded after your plugin.
-
Code:
function PLUGIN:OnPlayerChat(arg) local player = arg and arg.connection and arg.connection.player local text = arg:GetString(0, "") if player and text ~= "" then global.ConsoleSystem.Broadcast("chat.add", rust.UserIDFromPlayer(player), "<color=#af5>" .. player.displayName .. ": " .. text .. " </color>") return true end end