Can't get a chat command to workSolved
Hi so I'm new to CSharp and I was trying to make my own command for rust that will trow out some text I've been trying to study peoples work to understand what is needed to make this work with no joy.what have I done wrong.
using System;
using System.Collections.Generic;
using Oxide.Core.Libraries.Covalence;

namespace Oxide.Plugins
{
    [Info("RulesCommand", "TenzO", "1.0")]
    [Description("Allows players to read the server rules.")]
    class ServerRules : RustPlugin
    {
        [Command("rules")]
        void cmdRules(IPlayer p, string command, string[] args)
        {
         p.Reply("<color=#ff0000ff>write rules here blar blar no being racist cunt.</color>");
        }
    }
}​
also can someone tell em how i add code correctly on this forum.

The icon in the middle of the image above. Your issue is that you are mixing different plugin types. Set your plugin as CovalencePlugin instead of RustPlugin and it will work.
5e13a8d5b2bc5.jpg Wulf

The icon in the middle of the image above. Your issue is that you are mixing different plugin types. Set your plugin as CovalencePlugin instead of RustPlugin and it will work.

Thanks man sorry, it is late here and I do tend to make stupid mistakes when I'm sleepy lol.

No worries. :)
Locked automatically