1. 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
     
    Last edited by a moderator: Apr 21, 2015
  2. Its not working for me, i dont get any messages.. but its loaded
     
  3. You'll need the correct plugin for death messages. This is just the api abstraction.
     
  4. Still using 1.18 oxide. is there a way to make a command so players can toggle death messages?
     
  5. Yeah use the version by Reneb as I no longer support 1.18
     
  6. 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;
                    }
                }
            }
    
    If I am reading this right:

    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);
    
    Will these call hooks in every mod that has those hooks defined?

    Thanks!
     
  7. Yes and yes.
     
  8. 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.
     
  9. Code:
    [Error] Death.cs(138,11): error CS1525: Unexpected symbol `end-of-file'
     
  10. You modified the downloaded file so I cannon't help you.
     
  11. 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.
     
  12. You also need the Death Messages plugin as this is only an api for plugins to hook into.
     
  13. So all I need to do is download Death Messages API and Death Messages Plugin and place it in /1300007/rust/save/server_data/oxide/plugins and will Death Messages pop up in the server chat? I tried putting both of the plugins in the plugin folder but it is still not working. Can you link me the files to download and where to place them please???
     
    Last edited by a moderator: Apr 21, 2016
  14. Wulf

    Wulf Community Admin

    Yes, and both files are linked under the Overview tab on this page.
     
  15. Finally it looks like it is working
     
  16. is there a way I can do popups at the top of the screen to show the damage they done per shot like Rustland?
     
  17. Sent you a pm.
     
  18. 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 ...