1. Getting my feet wet with Rust plugin development, and getting this error. Not sure what reference I'm missing. I have
    Assembly-CSharp
    Facepunch.Network
    Facepunch.System
    Facepunch.UnityEngine
    Oxide.Core
    Oxide.Core.CSharp
    Oxide.Game.Rust
    UnityEngine
    UnityEngine.UI

    Error while compiling: RustyRockets.cs(6,24): error CS0234: The type or namespace name `Tasks' does not exist in the namespace `System.Threading'. Are you missing an assembly reference?

    Here is a bit of my code
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using System.Reflection;
    using Oxide.Core;
    using Oxide.Core.CSharp;
    using Oxide.Core.Plugins;
    using Oxide.Game.Rust.Libraries;
    using UnityEngine;namespace Oxide.Plugins
    {
        [Info("RustyRockets", "Tanner", 0.1)]
        [Description("Gives Rockets and C4 to everyone on the server at the time you want!")]    class RustyRockets : RustPlugin
        {
            void Loaded()
            {
                Puts("[RustyRockets] Loaded.");
            }        void UnLoaded()
            {
                Puts("[RustyRockets] Unloaded.");
            }        [ChatCommand("RustyRockets")]
            void pofpl(BasePlayer player, string command, string[] args)
            {
                player.inventory.GiveItem(ItemManager.CreateByItemID(1578894260, 100)); //Rockets
                player.inventory.GiveItem(ItemManager.CreateByItemID(498591726, 100)); //C4
            }
        }}
    Thanks.
     
  2. Wulf

    Wulf Community Admin

    Remove all of the using statements in your plugin, you pretty much aren't using any of them. Also, UnLoaded is not a valid hook, it should be Unload. You also do not need to print when your plugin is loaded and unloaded, that is already done by Oxide. Also, keep in mind that commands are case-insensitive, so SpellingItOutLikeThis will not make a difference.
     
  3. Right, I meant to change that to Unload, also didn't know that they automatically did it, thanks. Removing the using statements fixed it.