BetterChat

Moved

Total Downloads: 26,139 - First Release: Apr 21, 2015 - Last Update: Jan 12, 2018

4.9898/5, 98 likes
  1. Thank.you for doing that. I Wanted to do some cleanup and stuff anyways in one of my next updates, thanks. :)
    [DOUBLEPOST=1429852808][/DOUBLEPOST]
    Also I see you removed the console chat print?
     
  2. LaserHydra updated Name Colors with a new update entry:

    Wulf

     
  3. Wulf

    Wulf Community Admin

    Yeah, it could be added back in, but most users will still see it either another plugin or from Rust itself, so it's likely not needed.

    Also, I had added this in an updated version locally, which may give you a nicer color list:
    Code:
    rust.SendChatMessage(player, "<b><size=15>Available name colors:" .. colors .. "</size></b>")
     
  4. Yea i added it because Rust only used to send it to the console with the standard chat. But because that one is blocked and rebuild with rust.SendChatMessage it doesnt. Thats why I added it.
    [DOUBLEPOST=1429853535][/DOUBLEPOST]
    You mean with bigger font... yeah propably it looks nicer.
    [DOUBLEPOST=1429865884,1429853197][/DOUBLEPOST]
    Also, how is it possible to make the console printed text colorful? The standard color tags dont work
     
  5. CHR

    CHR

    Hey,

    I just wanna use the vip Feature without the auth... but it seems i cant deactivate them :/
    I wanna give just a Special Group colord nicks all others should Keep normal.
     
  6. for now you can just use these colors (those are the exact standard colors ;) )
    Owner: #ACFA58
    Mod: #ACFA58
    Player: #58ACFA
     
    Last edited by a moderator: Apr 24, 2015
  7. CHR

    CHR

    Means Oxide permission dosnt work? I Need the permission System ... crap :/
     
  8. It does, I don't understand what exactly you want now ^^
    You just need to set PermissionsEnabled to true
    maybe delete your old config, and reload the plugin to generate the new one as it got a little bit changed
    [DOUBLEPOST=1429880214][/DOUBLEPOST]Okay I understood what you want. But yeah you can just use the permissions system and give VIP the color you want and change the other colors to those I told you.
     
  9. This double chats with chathandler installed
     
  10. I know. I don't think you will need both though. If you do, try disabling some stuff in the config of Chathandler to maybe fix it.
    Im maybe trying to make it compatible but thats not a high priority at the moment.
     
  11. Wulf

    Wulf Community Admin

  12. CHR

    CHR

    Well but I need to have a disabled auth colors. Means I wanna keep them like they are standard. And wanna create a group for vip but this does not work right now I'm right?
     
  13. If I use this mod with Ranks and Titles it duplicate my name
     
  14. Yes thats the same problem Like with chathandler
     
  15. Wulf

    Wulf Community Admin

    A few other recommend changes for you, as auth level checking shouldn't even be needed as default groups are there no matter what. This shortens and simplifies your plugin significantly. I've also switch to only changing the name instead of modifying the chat, so this should fix any conflicts.
    Code:
    PLUGIN.Title       = "Name Colors"
    PLUGIN.Description = "Change default chat name colors for users by permission group."
    PLUGIN.Author      = "LaserHydra"
    PLUGIN.Version     = V(1, 2, 0)
    PLUGIN.ResourceId  = 979function PLUGIN:LoadDefaultConfig()
        self.Config.Colors = self.Config.Colors or {}
        self.Config.Colors.Player = self.Config.Colors.Player or "lime"
        self.Config.Colors.Moderator = self.Config.Colors.Moderator or "yellow"
        self.Config.Colors.Owner = self.Config.Colors.Owner or "orange"
        self.Config.Colors.VIP = self.Config.Colors.VIP or "aqua"
        self.Config.PermissionsEnabled = nil -- Removed
        self.Config.AuthlevelEnabled = nil -- Removed
        self.Config.ConsoleWarningDelaySeconds = nil -- Removed
        self.Config.AuthlevelColors = nil -- Removed
        self.Config.PermissionColors = nil -- Removed
        self:SaveConfig()
    endfunction PLUGIN:Init()
        command.AddChatCommand("colors", self.Plugin, "ColorList")
        if not permission.GroupExists("vip") then permission.CreateGroup("vip", "V.I.P.", 0) end
        self:LoadDefaultConfig()
    endfunction PLUGIN:ColorList(player)
        local colorList = { "aqua", "black", "blue", "brown", "darkblue", "green", "grey", "lightblue", "lime",
            "magenta", "maroon", "navy", "olive", "orange", "purple", "red", "silver", "teal", "white", "yellow"
        }
        local colors = ""
        for k, color in pairs(colorList) do
            colors = colors .. "\n" .. "<color=" .. color .. ">" .. string.upper(color) .. "</color>"
        end
        rust.SendChatMessage(player, "<b><size=15>Available name colors:" .. colors .. "</size></b>")
    endfunction PLUGIN:OnPlayerConnected(packet)
        if not packet then return end
        if not packet.connection then return end
        local connection = packet.connection
        local steamId = rust.UserIDFromConnection(connection)
        local groups = permission.GetUserGroups(steamID):GetEnumerator()
        while groups:MoveNext() do
            if groups.Current == "admin" then
                connection.username = "<color=" .. self.Config.Colors.Owner .. ">" .. connection.username
                break
            elseif groups.Current == "moderator" then
                connection.username = "<color=" .. self.Config.Colors.Moderator .. ">" .. connection.username
                break
            elseif groups.Current == "vip" then
                connection.username = "<color=" .. self.Config.Colors.VIP .. ">" .. connection.username
                break
            else
                connection.username = "<color=" .. self.Config.Colors.Player .. ">" .. connection.username
            end
        end
    end
    The new config:
    Code:
    {
      "Colors": {
        "Owner": "orange",
        "Moderator": "yellow",
        "VIP": "aqua",
        "Player": "lime"
      }
    }
    The group checking could probably be even more dynamic though.
     
    Last edited: Apr 24, 2015
  16. Well if you just want it to make it look like standard you can use the Color codes i gave you and it will look exactly the Same. If you turn on PermissionsEnabled then it should create the group VIP automaticly.
    [DOUBLEPOST=1429894776][/DOUBLEPOST]
    Okay thanks Wulf. But anyways now I Need to learn some New thing.I never used before so I can Update or edit the plugin finely ^^
     
  17. Wulf

    Wulf Community Admin

    That should give you a good start. ;)
     
  18. #NothingToDoAnymore
    #WulfDidMyJob
    XD
     
  19. @LaserHydra If you want to add more Ranks And Titles support you can call my function
    Code:
    grabPlayerData: function(steamID, key) {
            return TitlesData.PlayerData[steamID][key];
        }
    
    You just need to send it a Steam ID and a key (what you want to get out of my data file)
    for instance if you want to grab the title in lua you can do:
    Code:
    RanksAndTitles:Call("grabPlayerData", steamID, "Title")
    This will send your plugin the title of the desired player. This is how Chat Handler and I get along so well together. However this function does not offer prefix support from my plugin. I'm not sure if NameColors has it's own prefix support or not (just had someone contact me about compatibility lol).

    If you need help or you want to do something on this end let me know so I can add a find for your plugin to disable chat on my end. So double posts don't happen.

    and if you want to do Color for said title you can also pull that from my plugin with my function
    Code:
    getColor
     
    Last edited by a moderator: Apr 24, 2015