Hi. i am getting this error message. Please help
Code:ERROR: oxidecore: [C]:-1 - A .NET exception was thrown trying to call cs.callplugins! 2:25 AM: ERROR: oxidecore: A .NET exception occured in user-code (@) 2:25 AM: ERROR: oxidecore: nil 2:25 AM: ERROR: oxidecore: [string "DeathHandler.lua"]:243: attempt to index field 'dataBlock' (a nil value) (@) 2:25 AM: ERROR: oxidecore: at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0 at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Death API [Unmaintained]
Discussion in 'Plugin Support' started by Hatemail, Jan 20, 2014.
-
Hatemail updated Death Handler with a new update entry:
Complete rewrite for Oxide 2.0
-
Its not working for me, i dont get any messages.. but its loaded
-
-
Still using 1.18 oxide. is there a way to make a command so players can toggle death messages?
-
Yeah use the version by Reneb as I no longer support 1.18
-
I am trying to understand your code and I ran into this.
Code:private void CheckForHuntingBow(TakeDamage takedamage, DamageEvent damage, ref DeathTags tags) { if (damage.attacker.client != null && ((tags.weapon.Equals(UNKNOWN) || tags.weapon.Equals("Bleeding")))) { PlayerInventory inv = damage.attacker.client?.netUser.playerClient.controllable.GetComponent<PlayerInventory>(); if (inv != null && (inv.activeItem?.datablock?.name?.Contains("Bow") ?? false)) { tags.weapon = inv.activeItem.datablock.name; } } }
The attacker must be a client (human)
AND
Either have an unknown weapon
Or
one that caused bleeding
Then if the attacker has an active inventory item that has "Bow" in it
the weapon tag is set to "Hunting Bow"
Thanks.
[DOUBLEPOST=1432503692][/DOUBLEPOST]There are these references also:
Code:Core.Interface.CallHook("OnPlayerDeath", takedamage, damage, tags); Core.Interface.CallHook("OnPlayerSuicide", takedamage, damage, tags); Core.Interface.CallHook("OnAnimalDeath", takedamage, damage, tags); Core.Interface.CallHook("OnDeployableDestroyed", takedamage, damage, tags); Core.Interface.CallHook("OnStructureDestroyed", takedamage, damage, tags);
Thanks! -
-
So the Death API calls the defined messages, niot vice versa.
As far as the hunting bow.... Rust sure made it harder than it needed to be.....
Thanks for your help and your code.
[DOUBLEPOST=1432507328][/DOUBLEPOST]So the Death API calls the defined messages, not vice versa.
As far as the hunting bow.... Rust sure made it harder than it needed to be.....
Thanks for your help and your code. -
Code:
[Error] Death.cs(138,11): error CS1525: Unexpected symbol `end-of-file'
-
-
Nothing is working for me. I have downloaded the plugin and placed it in /1300007/rust/save/server_data/oxide/plugins because I am using Oxide 2.0 and it doesn't pop up with a .lua file or nothing in the data. Also I have tried restarting the server multiple times nothing works.
-
-
Last edited by a moderator: Apr 21, 2016
-
Wulf Community Admin
-
Finally it looks like it is working
-
is there a way I can do popups at the top of the screen to show the damage they done per shot like Rustland?
-
-
How to see kill log?? I'm using oxide 2.0, Death API Version 1.0.0 and Death Messages. i well using death message. But I can't see kill log in serverdata\oxide\data folder. Please help me ...