1. 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!
     
  2. Wulf

    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.
     
  3. You'll need to create or request/pay for a custom plugin to do this.
     
  4. I'm trying to change their names when they chat. Here's how it's ending up:
    [​IMG]

    I think that's highly unreasonable, I'm writing all of my own plugins, I'm simply reaching out to the community to see if anyone has accomplished this.
    [DOUBLEPOST=1423364407][/DOUBLEPOST]
    Mind you it's been done in the following manner:
    name = "<color=#A347FF>" .. name .. "</color>"
     
  5. Wulf

    Wulf Community Admin

    rust.SendChatMessage(player, "<color=#A347FF>" .. name .. "</color>", message)
     
  6. Thanks Wulf for the reply. I don't think this is going to help me. I'm referring to when a player types normally in chat, I want to change their name color, the code provided will send it as if it's coming from the server:
    [​IMG]

    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 =(.
     
  7. Wulf

    Wulf Community Admin

    You'll have to hook into OnPlayerChat, intercept the chat, change it, and then send it using rust.BroadcastChat instead.
     
  8. Good suggestion, I tried this as well. I'm failing to block the original message, I'll keep trying, thanks!
     
  9. Wulf

    Wulf Community Admin

    Look at how plugins such as Chat Handler do it.
     
  10. Ah it's OnRunCommand not OnPlayerChat. I lose the players steam icon doing this. A challenge :).

    Thanks for all of your help.
     
  11. I used OnRunCommand() because OnPlayerChat() wasnt implemented back then, its essentialy the same.
    To get the players steam icon you need to pass the players steamID within the chat broadcast.
     
  12. Thanks Domestos!

    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
     
  13. Thanks Incisus, been playing with making a plugin and that certainly explained a few questions I had about the chat system.
     
  14. 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
     
  15. I guess you are using notfier for that? In notifier you can go into the config where you can change nearly everything
     
  16. Yeah it does that and even much more (Joining / leaving mesages, announces, /admins, /plugins, /player, /seed, /map and more)
     
  17. do you have a namelist and a color list where i can see what color i can use?