Hello LaserHydra,
I'm working on a small server manager working with RCON (GitHub - MarlBurroW/rust-commander).
It's hard for me to handle BetterChat messages via RCON because it doesn't send the default chat message event (I just see a generic message for logging).
* BetterChat generic event: https://i.imgur.com/asS9s9D.png
This one seems to be an automatic generic event triggered bv oxide for logging.
* Expected additional event: https://i.imgur.com/RclQx3B.png
This is the "standard" event to handle chat message via rcon, unfortunately this one is not sent when BetterChat is enabled.
As you can see on the "standard" event, the Message property is a JSON string with some information about the message like the player ID (this help to manage many internal feature in my app). Do you think you can trigger an additional RCON event with the same format to "simulate" the default RCON chat message event ? I don't know Oxide so I don't know if it's possible to send RCON messages via the API.
I think all 3rdparty apps use this event to handle chat messages so it's important to keep it.
What do you think ?
Thanks
BetterChat
Moved
Total Downloads: 26,143 - First Release: Apr 21, 2015 - Last Update: Jan 12, 2018
- 4.9898/5, 98 likes
-
Hello,
I was wondering how do i get the primary group of a player in a different plugin? -
i still have this spamming my console sometimes
Code:Failed to call hook 'OnUserChat' on plugin 'BetterChat v5.0.12' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.BetterChat.OnUserChat (IPlayer player, System.String message) [0x00000] in <filename unknown>:0 at Oxide.Plugins.BetterChat.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
-
[DOUBLEPOST=1505823751][/DOUBLEPOST]
[DOUBLEPOST=1505823828][/DOUBLEPOST]
[DOUBLEPOST=1505823854][/DOUBLEPOST]
Though: If your plugin requires BetterChat (fully depends on BC) , you can add "// Requires: BetterChat" at the top of your plugin and use BetterChat's classes directly.Last edited by a moderator: Sep 19, 2017 -
LaserHydra updated Better Chat with a new update entry:
5.0.13
-
This will get all of the users groups, right? How do i go about getting the primary group? -
thank you ..
but i don't need the default group i can't remove it ? -
Code:ChatGroup primary = null;foreach (ChatGroup group in groups) if (primary == null || group.Priority < primary.Priority) primary = group;
-
Wulf Community Admin
-
The default group is for all players. So if you don't want the default players to look different, just change their colors to the game default. -
i removed my self from the default group and add my self to Admin group and its work good
[ADMIN] Arkan : test chat
till i disconnect and reconnect again
its show that i have 2 groups in chat like this :
[Player] [ADMIN] Arkan : test chat -
-
i set the priorities but it just reorder the groups
ADMIN PLAYER Arkan : chat
how to Enable "HiddenIfNotDefault" ? -
-
like this ?
Code:{ "GroupName": "default", "Priority": 0, "Title": { "Text": "[Player]", "Color": "#55aaff", "Size": 15, "Hidden": false, "HiddenIfNotPrimary": true }, "Username": { "Color": "#55aaff", "Size": 15 }, "Message": { "Color": "white", "Size": 15 }, "Format": { "Chat": "{Title} {Username}: {Message}", "Console": "{Title} {Username}: {Message}" }
-
-------
Hey @LaserHydra is this the correct way to call for the API to get the groups?
Code:var UserGroups = (List<object>)BetterChat?.Call("API_GetUserGroups", player);
-
nop .. still the same problem ..
i hide the whole group to fix this problem :/ -
-
yes admin priority is 1
and players 0 -