1. Im trying to do this in C#:
    Code:
    function PLUGIN:Init()
        self.LoadDefaultConfig()
        command.AddChatCommand(self.Config.Command, self.Object, cmdCommand)
    endfunction PLUGIN:LoadDefaultConfig()
        self.Config.Command = self.Config.Command or "test"
    endfunction PLUGIN:cmdCommand(player, cmd, args)
        rust.SendChatMessage(player, cmd .. " Command activated!")
    end
     
    Last edited by a moderator: Jun 28, 2015
  2. It is the exact same as if you were doing it in lua.

    var command = Interface.Oxide.GetLibrary<Command>();
    command.AddChatCommand("Test", this, "MethodName");
     
  3. so you can also do it like that, I though you can only do [ChatCommand(command)] void cmdCommand()
    Thanks