CustomChatCommands

Moved

Total Downloads: 1,432 - First Release: Feb 5, 2017 - Last Update: May 22, 2018

5/5, 6 likes
  1. Wulf

    Wulf Community Admin

    What is your config? What did you see when you used them?
     
  2. "Invalid command" default reply. I've been using the same config I've always been using, and didn't require an update from 2.0.0; I'll post it as soon as I can, as I'm not home at the moment. Sorry for the delay. I appreciate your time.
     
  3. Ah, I see what the issue was. I had to add , to the end of each "" line, such as:

    Code:
        {
          "Command": "examplehere",
          "Messages": [
            "1",
            "2",
            "3"
          ],
    I didn't have them before, and adding them makes it work. Very sorry about that Wu.lf. I hope this helps anybody else who has my mistake.
     
  4. After the update does not recognize more than 1 line each
     
  5. Wulf

    Wulf Community Admin

    What does your config look like?
     
  6. Here, I save it in UTF-8, before the update it was working fine
     

    Attached Files:

  7. Wulf

    Wulf Community Admin

    That isn't valid JSON, so there's no way that worked before any update or ever. Check with www.jsonlint.com; you're missing commas, quotation marks, etc.
     
  8. I swear that I was working before
     
  9. Wulf

    Wulf Community Admin

    I swear it's not something that could be loaded. :p

    Each line that you want as a separate message needs to be enclosed in quotation marks, and each line in each section needs to have a comma following it except for the last line in each section. This is how JSON works.
     
  10. Grr, I know that, I'm not liying, nvm
     
  11. Wulf

    Wulf Community Admin

    Didn't say you were, just saying that it wouldn't work like it currently is. I'd suggest pasting it on www.jsonlint.com and seeing what you need to change.
     
  12. @Cadaver
    A config without commas worked before, but as stated above, they are necessary now due to an unknown reason. The reason is irrelevant. Just add commas and you'll be good to go, that's how I fixed my config.

    Type "oxide.reload CustomChatCommands" and check the line you have errors in (it should be one line before the line stated in the file, and then add a comma to the end of the line of the config. It's simple if you just check the example I posted above... or just follow Wu.lf's directions. But it most definitely was working without commas before, I had that same config set up for at least 3+ months.

    TL;DR: Follow the example I posted above.
     
  13. ADM THIS SAVE MY SEVER (I DLETE 4 PLGUINS FOR THIS) :D
     
  14. Code:
    (18:50:28) | Failed to call hook 'CustomCommand' on plugin 'CustomChatCommands v2.1.0' (FormatException: Input string was not in the correct format)
    (18:50:28) | at System.UInt64.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0
      at System.UInt64.Parse (System.String s) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CustomChatCommands.CustomCommand (IPlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CustomChatCommands.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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
    I got the above when putting the following into rcon/console: wipe

    Here is the config:
    Code:
    {
      "Reset Cooldowns On New Map": true,
      "Reset Max Uses On New Map": true,
      "Reset Max Uses At Midnight": false,
      "Commands": [
        {
          "Command": "keybinds",
          "Messages": [
            "<color=lime>For Optimum Game Play, We Suggest The Following Key Bind's</color>",
            "<color=#800000ff>Backpacks: To bind a key to open the backpack, press F1 & type: bind <Your Desired Key Here> backpack.open</color>",
            "<color=#800000ff>ClanUI - To bind a key to open the Clans Menu, press F1 & type: bind <Your Desired Key Here> ClansUIToggle</color>",
            "<color=#800000ff>TP GUI - To bind a key to open the TP GUI, press F1 & type: bind <Your Desired Key Here> tpgui</color>",
            "<color=#800000ff>Homes GUI - To bind a key to open the Homes GUI, press F1 & type: bind <Your Desired Key Here> homegui</color>",
            "<color=#800000ff>Ranks GUI - To bind a key to open the Ranks GUI, press F1 & type: bind <Your Desired Key Here> ToggleTops</color>",
            "<color=#800000ff>JPipes - To bind a key to quickly use JPipes, press F1 & type: bind <Your Desired Key Here> jpipes.create</color>",
            "<color=#800000ff>Do not include the < & > just put the key so like: h homegui</color>"
          ],
          "Permission": "",
          "ConsoleCmd": null,
          "UserID": 0,
          "Broadcast": false,
          "RconCmd": null,
          "Cooldown": 0.0,
          "MaxUses": 0
        },
        {
          "Command": "donate",
          "Messages": [
            "<color=#800000ff>To Gain 30 Days Of VIP Access \nPlease Send £10 Via PayPal To: n\[email protected] \nYou MUST include your Player Name or Steam64 ID \n Example: 765611973590xxxxx</color>"
          ],
          "Permission": "",
          "ConsoleCmd": null,
          "UserID": 0,
          "Broadcast": false,
          "RconCmd": null,
          "Cooldown": 0.0,
          "MaxUses": 0
        },
        {
          "Command": "serverwipe",
          "Messages": [
            "<color=lime>This Server Is Wiped On The First Thursday Of Every Month (Forced Wipe ONLY)</color>"
          ],
          "Permission": "",
          "ConsoleCmd": [
            "wipe"
          ],
          "UserID": 0,
          "Broadcast": true,
          "RconCmd": null,
          "Cooldown": 30.0,
          "MaxUses": 0
        }
      ]
    }
    I'm assuming whilst using a Rcon tool like RustAdmin I would put the wipe into the ConsoleCmd as from what I read on the Overview in the RconCmd that prints to rcon? or is that where i need to put wipe so I can have this broadcast to the server via simple command?
     
  15. Plugin working for anyone else after this morning's update?
     
  16. Wulf

    Wulf Community Admin

    Details please.
     
  17. Plugin is compiling fine. Deleted my config, reloaded default. Tried default config command /sinfo.

    Unknown Command: sinfo
     
  18. Wulf

    Wulf Community Admin

    What does your config look like?
     
  19. Disregard, mistakenly thought it was working. Still doesn't work with default generated (attached) config.
    Code:
    (20:13:15) | Failed to initialize plugin 'CustomChatCommands v2.1.0' (JsonReaderException: Unexpected character encountered while parsing value: [. Path 'Commands', line 2, position 15.)
    (20:13:15) | Unloaded plugin CustomChatCommands v2.1.0 by PsychoTea
    (20:13:15) | No previous version to rollback plugin: CustomChatCommands
     

    Attached Files:

  20. Still isn't working. Default config. Works on one server but not the other.
    Code:
    (18:05:11) | CustomChatCommands was compiled successfully in 1713ms
    (18:05:11) | Failed to initialize plugin 'CustomChatCommands v2.1.0' (JsonReaderException: Unexpected character encountered while parsing value: [. Path 'Commands', line 2, position 15.)
    (18:05:11) | Unloaded plugin CustomChatCommands v2.1.0 by PsychoTea
    (18:05:11) | No previous version to rollback plugin: CustomChatCommands