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.
Solved Adding multiple commands, same method?
Discussion in 'Rust Development' started by Bobakanoosh, Feb 15, 2017.
-
Code:
cmd.AddChatCommand("<ChatCommand>", this, "<FunctionName>");
-
Mm... No?
Alias System for Rust | Oxide -
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")]
Code:AddCovalenceCommand(new[] { "command1", "command2" }, "MyMethod");
-
Code:
[Command("command1", "command2", "command3")]
-
Code:[ChatCommand("command1", "command2")]
-
Wulf Community Admin
-
`Oxide.Plugins.ChatCommandAttribute' does not contain a constructor that takes `2' arguments
this error -
Wulf Community Admin