1. GreenArrow

    GreenArrow Wood Hoarder

    Code (Text):
    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 Community Admin Oxide Developer

    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. GreenArrow

    GreenArrow Wood Hoarder

    Code (Text):
    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 Community Admin Oxide Developer

    Code (C#):
            [ChatCommand("cmdtest")]
            void TestCommand(BasePlayer player, string command, string[] args)
            {
               
            }
     
  5. GreenArrow

    GreenArrow Wood Hoarder

    Still doesn't seem to work
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    "Doesn't work" doesn't help me help you, I need any errors, details, etc.
     
  7. GreenArrow

    GreenArrow Wood Hoarder

    I understand but no errors at all just "Unknown Command" still
     
  8. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    And where are you trying to test it?
     
  9. GreenArrow

    GreenArrow Wood Hoarder

    in game /cmdtest
     
  10. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Could I see your latest oxide/logs as well as the full plugin please?
     
  11. GreenArrow

    GreenArrow Wood Hoarder

    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"