BetterChat

Moved

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

4.9898/5, 98 likes
  1. (18:57:32) | Failed to initialize plugin 'BetterChat v5.0.5' (JsonReaderException: Unexpected character encountered while parsing value: }. Path '[2].Title.HiddenIfNotPrimary', line 57, position 5.)

    How do I fix this?

    Edit: This happened when I uploaded your version to fix clans which was posted on page 29.
     
  2. adding permisons to my vip group dose not have any effect any reason for this
     
  3. You have made a mistake in the json file thats in the data folder check it on this site JSONLint - The JSON Validator.
     
  4. Thank you very much, fixed now.
     
  5. about working with clans. There is a little trouble when trying to setting up clan colors same as username colors.
    it will be great to add ability to color ThirdPartyTitles as username, if they not contains color information.
    for example:

    BetterChat.cs
    Code:
    foreach (var thirdPartyTitle in ThirdPartyTitles)                {
                        try
                        {
                            string title = thirdPartyTitle.Value(player);                        if (!string.IsNullOrEmpty(title))
                            {
                                if (!title.StartsWith("[#"))
                                {
                                    titles.Add($"[#{primary.Username.GetUniversalColor()}][+{primary.Username.Size}]{title}[/+][/#]");
                                }
                                else titles.Add(title);                         
                            };
                        }
                        catch (Exception ex)
                        {
                            Instance.PrintError($"Error when trying to get third-party title from plugin '{thirdPartyTitle.Key}'{Environment.NewLine}{ex}");
                        }
                    }
    
    Clans.cs
    Code:
     // Returns colored clan tag for IPlayer        private string GetColoredClanTag(IPlayer player)
            {
                var clan = findClanByUser(player.Id);            if (clan != null && !string.IsNullOrEmpty(clan.tag))
                {
                    if (!string.IsNullOrEmpty(clanTagColor))
                    { 
                        return $"[#{(clanTagColor.StartsWith("#") ? clanTagColor.Substring(1) : clanTagColor)}][{clan.tag}][/#]";
                    }
                    else
                    {
                        return $"[{clan.tag}]";
                    };
                }
                return null;
            }
    
    PS: this is very simple implementation, but maybe @LaserHydra can do it better =)
     
    Last edited by a moderator: Mar 22, 2017
  6. That program is very old and from what I remember from a post a few pages back it only works for the older version of the plugin so upload the betterchat.json file from your data folder and tell me what groups you want ie their names will make it for you
     
  7. Code:
    [
      {
        "GroupName": "default",
        "Priority": 6,
        "Title": {
          "Text": "[Player]",
          "Color": "#9EC326",
          "Size": 15,
          "Hidden": true,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#55aaff",
          "Size": 15
        },
        "Message": {
          "Color": "white",
          "Size": 15
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      },
      {
        "GroupName": "vip",
        "Priority": 5,
        "Title": {
          "Text": "[VIP]",
          "Color": "Cyan",
          "Size": 15,
          "Hidden": false,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#55aaff",
          "Size": 15
        },
        "Message": {
          "Color": "white",
          "Size": 15
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      },
      {
        "GroupName": "VIP+",
        "Priority": 4,
        "Title": {
          "Text": "[VIP+]",
          "Color": "Cyan",
          "Size": 15,
          "Hidden": false,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#55aaff",
          "Size": 15
        },
        "Message": {
          "Color": "white",
          "Size": 15
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      },
      {
        "GroupName": "admin",
        "Priority": 0,
        "Title": {
          "Text": "[admin]",
          "Color": "#3bc512",
          "Size": 15,
          "Hidden": true,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#af5",
          "Size": 15
        },
        "Message": {
          "Color": "white",
          "Size": 15
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      },
      {
        "GroupName": "police",
        "Priority": 3,
        "Title": {
          "Text": "[Police]",
          "Color": "cyan",
          "Size": 15,
          "Hidden": false,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#55aaff",
          "Size": 15
        },
        "Message": {
          "Color": "white",
          "Size": 15
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      },
      {
        "GroupName": "chatmod",
        "Priority": 2,
        "Title": {
          "Text": "[Chat Mod]",
          "Color": "#3bc512",
          "Size": 15,
          "Hidden": false,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#55aaff",
          "Size": 15
        },
        "Message": {
          "Color": "white",
          "Size": 15
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      },
      {
        "GroupName": "aztir",
        "Priority": 1,
        "Title": {
          "Text": "[HNn-Hero]",
          "Color": "cyan",
          "Size": 15,
          "Hidden": false,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#00E39E",
          "Size": 15
        },
        "Message": {
          "Color": "white",
          "Size": 15
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      }
    ]
     
  8. Woah really? Thats really nice of you, ok, I gave you my file, I only want Owner, Mod , Admin, Then Default, maybe if I wanted vip rank for people to buy cosmetics then I guess I can make it myself.
     

    Attached Files:

  9. The program was recently updated and should work just fine with the latest versions of BetterChat.
    [DOUBLEPOST=1490260779][/DOUBLEPOST]
    Looks like the installation failed. Eventually your antivirus blocked the placement of the files.
    Did you use the latest version of the Group Manager installer listed on the overview?
     
  10. hello
    Code:
    [Better Chat] Error when trying to get third-party title from plugin 'Oxide.Plugins.PlayerChallenges'System.NullReferenceException: Object reference not set to an instance of an objectat Oxide.Plugins.PlayerChallenges.GetPlayerTitles (IPlayer player) [0x00000] in <filename unknown>:0at Oxide.Plugins.BetterChat+ChatGroup.FormatMessage (IPlayer player, System.String message) [0x00000] in <filename unknown>:0
    
    Do you have a solution to me

    thank you
     
  11. That's an error inside the PlayerChallenges plugin.
     
  12. LaserHydra updated Better Chat with a new update entry:

    5.0.6

     
  13. OMG my chat is [#55aaff][+15][Player][/+][/#] [#55aaff][+15]Joker[/+][/#]: [#white][+15]sa[/+][/#], all players say [#20FF7D][+15][Player][/+][/#] [#4ABFA5][+15]aCe[/+][/#]: [#E7EA88][+15]:D[/+][/#]
     
  14. Yeah my chat is screwed like this aswell
     
  15. + Guard no!!!
     
  16. Sorry guys, noticed it a bit late, working on it!
     
  17. Same here. all i wanted was to make the admin color same as all other players but this is what i got.

    Can you say Broke Plugin ?
    [DOUBLEPOST=1490296445][/DOUBLEPOST]saw you are working on it after i posted. will remove the plugin until you figure it out. :)
     
  18. LaserHydra updated Better Chat with a new update entry:

    5.0.7


    [DOUBLEPOST=1490296602][/DOUBLEPOST]
    Fixed guys!
     
  19. 5.0.7 didn't fix the issue
    [​IMG]