1. Oxide for Rust Legacy has been discontinued and is no longer supported. No updates or additions will be made, and Rust Legacy-specific plugin submissions will no longer be accepted. We recommend upgrading to the latest version of Rust as able.
    Dismiss Notice
  1. mcnovinho08

    mcnovinho08 Plugin Developer

    Would have some way to block the command of the player in chat, example the guy was reporting during the test he will not have to accept tpr among other things!
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Hook into the OnRunCommand hook and cancel it.
     
  3. mcnovinho08

    mcnovinho08 Plugin Developer

    But at the same time canceling the command wanted to send a message to both players as the target user and netuser
     
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Send a message before cancelling it then. ;)
     
  5. mcnovinho08

    mcnovinho08 Plugin Developer

    Take the order, but you could send me an example of how to block the command, because I have never used this type of void!
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Code (C#):
    object OnRunCommand(ConsoleSystem.Arg arg)
    {
        if (arg.command == "blah") return true; // Command blocked
        return null;
    }
    Keep in mind this code may vary, as I don't really recall much Rust Legacy code anymore.
     
  7. mcnovinho08

    mcnovinho08 Plugin Developer