I tried removing a chat command with this code.. which i got from Oxide/Command.cs at master · OxideMod/Oxide · GitHub
Did anyone managed to remove a command somehow ?Code:[ChatCommand("removecmd")] void cmdRemove(BasePlayer player, string command, string[] args) { var rustcommands = typeof(ConsoleSystem.Index).GetField("dictionary", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null) as IDictionary<string, ConsoleSystem.Command>; rustcommands.Remove(args[0]); SendReply(player, "You have removed the " +args[0]); }
Thanks for any help,
PaiN
Removing a chat command
Discussion in 'Rust Development' started by PaiN, Dec 4, 2015.
