Changing player chat color and prepending a symbol?
Hiya,

I'd like to change a players chat color based on their Oxide/Umod permission group, and add a symbol in front of their name.

I have an idea how this would work:

Check if player is in group OR player SteamID in config
Prepend symbol to name

From there I'm not sure how best to proceed? I know I can wrap the player name in <color> tags but that seems like bit of a hack - is there a better way to format player names? I didn't see anything in the documentation.

Thanks in advance,


Tony.

Merged post

Also, what are the limitations for characters usable in chat, I've seen players using all sorts of weird stuff but have no idea what the full tange of options are, is it a specific subset of something? Ta.
There's a plugin called BetterChat
I appreciate there is Better Chat, I'll take a look at the code in there again, I looked this morning and it wasn't obvious how it did what it does. Not to me before coffee anyway...
You can either format the chat (cancel original and send a new one), or you can rename the players; the cancel and re-format option is usually best.

This can be done via the OnPlayerChat (documented) or OnUserChat (universal, not documented) hooks.
Thanks Wulf, I started looking at using OnPlayerChat and reformatting the name.