1. Code:
    using UnityEngine;namespace Oxide.Plugins
    {
        [Info("EpicPlugin", "Unknown", "1.0.0")]
        [Description("A basic console command")]    class EpicPlugin : CovalencePlugin
        {
            [Command("global.test")]
            void TestCommand(IPlayer player)
            {
                Puts("Test successful!");
            }
        }
    }
    Using Rusty or Rust:IO console it doesn't print anything. Why? Console commands are mean to work only in-game? Just wondering, because it offers me to use IPlayer parameter.
     
  2. Wulf

    Wulf Community Admin

    Code:
    namespace Oxide.Plugins
    {
        [Info("EpicPlugin", "Unknown", "1.0.0")]
        [Description("A basic console command")]    class EpicPlugin : CovalencePlugin
        {
            [Command("global.test")]
            void TestCommand(IPlayer player, string command, string[] args)
            {
                Puts("Test successful!");
            }
        }
    }
    You're missing a couple of required arguments. The plugin likely errors without them, if you check your logs.
     
  3. [​IMG]
     
  4. Wulf

    Wulf Community Admin

    The command appears to be working, but pretty sure most RCON clients filter Oxide log messages. You can try player.Reply and see if that works instead.
     
  5. logs/oxide_2016-11-11.txt
    Code:
    02:30 [Info] Unloaded plugin MyPlugin v1.0.0 by Pastori
    02:30 [Info] Loaded plugin MyPlugin v1.0.0 by Pastori
    02:30 [Warning] MyPlugin has replaced the 'test' command previously registered by MyPlugin 
    Still same result. I cannot get it print anything to console. I'm trying Rusty and Rust:IO. Logs says that the command has been replaced as you see above, but I don't really know what's wrong. If RCON tool doesn't print it out in console. Should Oxide write it to logs that are located in "logs" folder of Oxide? If yes, then that was a result.
    [DOUBLEPOST=1478828256][/DOUBLEPOST]PS. Replying to player didn't work. Same result.
     
  6. Wulf

    Wulf Community Admin

    Oxide writes to the logs when you use Puts, so it would be there. Also, you can drop the global. from the command, it's automatic.
    [DOUBLEPOST=1478828855,1478828658][/DOUBLEPOST]Working fine with my test:
    1f190d317b83b9be76b43c2394174819.png
     
  7. [​IMG]
    Thank you. I tried without a global before, but I had missing parameters when I tried without it.
    By the way. Why API Docs is missing the parameters?
     
  8. Wulf

    Wulf Community Admin

    Current Docs are a bit outdated.