1. I'd like my user to be able to choose which command they want to use, but have them all do the same thing. i.e /dr, /discordreport, and /report. Obviously I could copy paste and make three commands for each of those, but I'm just wondering if there is a way to make an alias for a command.
     
  2. Code:
    cmd.AddChatCommand("<ChatCommand>", this, "<FunctionName>"); 
    [DOUBLEPOST=1487146192][/DOUBLEPOST]You could also just bind it on a key with the HotKeys plugin. I did it with the /tpa command. simplifies things.
     
  3. Wulf

    Wulf Community Admin

    For a universal plugin (what the OP has), you'd need to use something slightly different than what was suggested.

    You can either use the command attribute method like:
    Code:
    [Command("command1", "command2", "command3")]
    or manually register the commands:
    Code:
    AddCovalenceCommand(new[] { "command1", "command2" }, "MyMethod");
     
  4. Code:
    [Command("command1", "command2", "command3")]
    Didn't know you could do that! thanks
     
  5. The same doesn't seem to work for chatCommand? e.g.
    Code:
    [ChatCommand("command1", "command2")]
     
  6. Wulf

    Wulf Community Admin

    ChatCommand is not the same as Command; the first is for a RustPlugin, the second is only for CovalencePlugin.
     
  7. [ChatCommand("help", "info")]

    `Oxide.Plugins.ChatCommandAttribute' does not contain a constructor that takes `2' arguments

    this error
     
  8. Wulf

    Wulf Community Admin

    ChatCommand only accepts one, Command for universal plugins can accept many.