1. Code:
    public CashSystem()
            {
                Title = ExtensionInfo.Title;
                Name = ExtensionInfo.Name;
                Author = ExtensionInfo.Author;
                Version = ExtensionInfo.Version;
                HasConfig = true;
                ResourceId = ExtensionInfo.ResourceId;
            }
            [HookMethod("Init")]
            void Init()
            {
                var library = Interface.GetMod().GetLibrary<Command>("Command");
                library.AddChatCommand("a", this, "a");
            }        [HookMethod("OnServerInitialized")]
            void OnServerInitialized()
            {
                LoadConfig();
            }        [ChatCommand("a")]
            void a(BasePlayer player, ConsoleSystem.Arg args)
            {
                player.ChatMessage("test");
            }
    is not printing the text
     
    Last edited by a moderator: Apr 7, 2015
  2. I'm really new i'm not sure what you want but check this out
    Code:
    [ChatCommand("a")]
    void a(BasePlayer player, ConsoleSystem.Arg args)
    {
    var message = "test";
    rust.SendChatMessage({ player, message });
    }
    
     
  3. that wouldnt work :p
     
  4. Ow he wants to print into console right ? i thought he want to send a message xD
     
  5. by what I saw
    the problem is that he is not recognizing
    the "a" command is calling the callback
    [DOUBLEPOST=1428458479][/DOUBLEPOST]
    do not want to print in chat
    [DOUBLEPOST=1428460856][/DOUBLEPOST]someone has a simple extension example in C # and can give me?
    [DOUBLEPOST=1428460971][/DOUBLEPOST]I think I'm doing it wrong
     
  6. Basic chat command example:
    Code:
    namespace Oxide.Plugins
    {
      [Info("Example", "Mughisi", 1.0)]
      class Example : RustPlugin
      {
        void Init()
        {
          Puts("Example loaded.");
        }    [ChatCommand("Example")]
        void Example(BasePlayer player, string cmd, string[] args)
        {
          SendReply(player, "You used the command example!");
        }
      }
    }
     
  7. as it says in the title
    Want example for extension and not for plugin
     
  8. Extensions would only be allowed for personal use and won't be accepted unless it adds core functionality like the current extensions.
     
  9. is for personal use
    I just want an example
    here I compile everything ok
    the oxide matter dll
    more commands in chat does not work
    I think I'm doing something wrong
     
  10. There are plenty of example in the oxide source shit you have everything you need in your first post. I'm not a firm believer in giving example but you should have enough to go on by my first sentence if not maybe you shouldn't be working on an extension.