^Title.
Equip hatchet, place storage and hit it, hook is not getting called anymore.
Did i miss something?
Solved OnEntityTakeDamage not always getting called
Discussion in 'Rust Discussion' started by Inofix, Dec 11, 2015.
-
Wulf Community Admin
Update to the latest Oxide snapshot, it was fixed.
-
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? -
Wulf Community Admin
-
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 -
Wulf Community Admin
-
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 ... -
Wulf Community Admin
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;
Code:namespace Oxide.Ext.Name { class Test { public static string GetValue() { return "example"; } } }
Code:Puts(Test.GetValue());
-
lol that easy ........ and i'm doing it the hard way 24/7.
Didn't know that one! Thanks Wulf! -
Wulf Community Admin
-
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. -
Wulf Community Admin
-
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; -
Wulf Community Admin
-
Wulf Community Admin
@Inofix, try "Includes", not "includes" like I mentioned previously.
-
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.
-
Wulf Community Admin
-
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 -
Wulf Community Admin