1. ^Title.

    Equip hatchet, place storage and hit it, hook is not getting called anymore.

    Did i miss something?
     
  2. Wulf

    Wulf Community Admin

    Update to the latest Oxide snapshot, it was fixed.
     
  3. Thanks, didn't see that github update.

    BTW I have a question, I've modified oxide and added some custom core functions to RustPlugins.cs

    It's annoying to download the whole project in order to paste my code over and over again and recompile it.

    Would it be possible to include my assembly somehow linked to your oxidemod + rust server so i would be able to use my functions?
     
  4. Wulf

    Wulf Community Admin

    What changes are you making that require core edits? Most things can be done via plugins or extensions. You can make your own extension (basically a non-sandboxed plugin) just like all of the official ones and Rust:IO.
     
  5. Well I've added a bunch of custom functions that help me out to develope my plugins. They all base on my functions, so yeah i pretty much need them.

    For example:

    SendChatMessageToPlayer(...)
    SendChatMessageToAll(...)
    SendChatMessageToAdmins(...)

    those are some of my global functions
     
  6. Wulf

    Wulf Community Admin

    All of that can be done via plugins. You can reference other plugins and even include them. Adding them yourself to the core is unnecessary.
     
  7. Well yeah i figured that out a few weeks ago, but i was too lazy to update all my plugins.

    So how would that look like? I'd like to create global functions that i can access with every c# plugin.

    I would prefer to use a assembly instead of a plugin and simply include the projects namespace.

    Would that be possible? Sorry my programming knowledge is not the biggest in the section ...
     
  8. Wulf

    Wulf Community Admin

    Plugins would be superior over compiled DLLs, as you can hotload them and develop them a lot easier. There's no way to use a compiled DLL unless you make an extension as previously suggested, but you'd have to shutdown your server to update it each time unless you make a wrapper of sorts.

    The proper way would be to make an Ext.Name.cs file (change Name to whatever you'd like) and place it under plugins/include, then you can reference that in your other plugins with:
    Code:
    using Oxide.Ext.Name;
    Here's an example include file:
    Code:
    namespace Oxide.Ext.Name
    {
        class Test
        {
            public static string GetValue()
            {
                return "example";
            }
        }
    }
    And now you call it in your other plugin:
    Code:
    Puts(Test.GetValue());
     
  9. lol that easy ........ and i'm doing it the hard way 24/7.

    Didn't know that one! Thanks Wulf!
     
  10. Wulf

    Wulf Community Admin

    No problem! It isn't really documented yet or fully tested, so let us know if you have any issues.
     
  11. Hey Wulf, sorry for bumping this thread, but I have a problem with your way.

    I have created a folder called include and a file called Ext.Functions.cs

    Each plugin is using the following

    using static Ext.Functions.CustomFunctions;

    But it's not finding the plugin file.

    What I'm doing wrong? Looks like the include file is not getting loaded.
     
  12. Wulf

    Wulf Community Admin

    Try using Oxide.Ext.Functions instead.
     
  13. Sorry, tried the following but none of them seem to work.

    using Oxide.Ext.Functions;
    using Ext.Functions;
    using static Oxide.Ext.Functions.CustomFunctions;
    using static Ext.Functions.CustomFunctions;
     
  14. Wulf

    Wulf Community Admin

    The Oxide.Ext.Functions is the correct way. Do you have an example of how you are using it? You may want to try "Includes" for the folder name, as that's what Oxide currently checks for, but it shouldn't matter for Windows.
     
  15. Wulf

    Wulf Community Admin

    @Inofix, try "Includes", not "includes" like I mentioned previously.
     
  16. I seem to go the right way, but there's a still a problem.

    Edit: Even tho i copied your example 1 by 1 and it's not working. Dunno What I am doing wrong now. Might just be too late for me.
    [​IMG]
     
  17. Wulf

    Wulf Community Admin

    Err, "Include" sorry, not "Includes."
     
  18. Well ... Looks like something is going wrong here. Same problem that it cannot find the class now.

    Mind helping me via teamviewer?

    Ok, look like it's conflicting with "using static ...;"

    Ain't there a workaround for this?

    Edit: Yeah figuired it out, need to call the class always. Ain't there a way to create a Macro or using directive without using the following syntax "class.method" always? I'd just like to use "method" in my example.
     
    Last edited by a moderator: Dec 17, 2015
  19. Wulf

    Wulf Community Admin

    Considering you could potentially have multiple classes in the extension, it's probably best not to assume.