1. Code:
    using Facepunch;
    using Newtonsoft.Json;
    using System;
    using System.Collections.Generic;
    using System.Threading;
    using UnityEngine;
    using UnityEngine.SceneManagement;namespace Oxide.Plugins
    {
        [Info("TestingCmds", "Alpha", 0.1)]
        [Description("test")]    class TestingCmds : RustPlugin
        {
            [Command("cmdtest")]
            void TestCommand(IPlayer player)
            {
                 
            }
        }
    }
    
    can someone tell me why im still getting "Unknown command" Ps Idk csharp so dont roast me lol
     
  2. Wulf

    Wulf Community Admin

    You are trying to use the CovalancePlugin [Command] attribute with a RustPlugin, which won't work. For the [Command] attribute to work, you'd have to switch to being a CovalencePlugin, else use the [ChatCommand] attribute with the associated method arguments.
     
  3. Code:
    using Facepunch;
    using Newtonsoft.Json;
    using System;
    using System.Collections.Generic;
    using System.Threading;
    using UnityEngine;
    using UnityEngine.SceneManagement;namespace Oxide.Plugins
    {
        [Info("TestingCmds", "Alpha", 0.1)]
        [Description("test")]    class TestingCmds : RustPlugin
        {
            [ChatCommand("cmdtest")]
            void TestCommand(IPlayer player)
            {
                
            }
        }
    }
    
    So like this ? Trying to understand
     
  4. Wulf

    Wulf Community Admin

    Code:
            [ChatCommand("cmdtest")]
            void TestCommand(BasePlayer player, string command, string[] args)
            {
               
            }
     
  5. Still doesn't seem to work
     
  6. Wulf

    Wulf Community Admin

    "Doesn't work" doesn't help me help you, I need any errors, details, etc.
     
  7. I understand but no errors at all just "Unknown Command" still
     
  8. Wulf

    Wulf Community Admin

    And where are you trying to test it?
     
  9. in game /cmdtest
     
  10. Wulf

    Wulf Community Admin

    Could I see your latest oxide/logs as well as the full plugin please?
     
  11. I found the problem XD sorry me being dumb it works now thanks for your help "my file had the wrong name and my console didnt show that smh"
     
  12. How do you do a console command like this?
     
  13. Wulf

    Wulf Community Admin

    Code:
            [ConsoleCommand("cmdtest")]
            void TestCommand(ConsoleSystem.Arg arg)
            {
             
            }
     
  14. It doesn't like ConsoleSystem.Arg

    It says The type or namespace ConsoleSystem could not be found. Do I need a Using statement?
     
  15. Wulf

    Wulf Community Admin

    Where does it say that? Are you using this on Rust?
     
  16. Yes using this on rust. It says that in Visual Studio.

    upload_2018-4-11_20-21-55.png
    [DOUBLEPOST=1523496187][/DOUBLEPOST]
    The chatcommand example you gave above works fine.
     
  17. Wulf

    Wulf Community Admin

    You're most likely missing a Rust DLL reference then. Make sure you're referencing the Facepunch.*.dll files from the server too.
     
  18. Found it. Thank you!
     
  19. Wulf

    Wulf Community Admin

    I'd suggest creating a new thread, as that'd be off topic and no sense in bumping this old thread more. ;)