1. PillsHere PillsHere for Rust | Oxide

    This is the plugin I tried to get to work by changing the hook. It worked prior to this update, I read that it's been changed but I'm not sure how to call base player with the hook. Anyone know?
     
  2. Wulf

    Wulf Community Admin

    The hook hasn't changed other than a 3rd argument being added, but that wouldn't affect the hook as you weren't using one already.
     
  3. I edited the plugin of PillsHere to make it so you would have radiation immunity upon using rad pills, although I'm not sure how to call baseplayer within the context or whatever was added to the hook.
     
  4. Wulf

    Wulf Community Admin

    Oh, you were looking at OnItemAction in the changelog. So no, nothing has changed at all for this hook and you can use it the same way you have been. I know the hook works fine as I added it to the plugin and tested it.
     
  5. If this is for PillsHere for some reason it didn't work on my end.
     
  6. Wulf

    Wulf Community Admin

    I bet the hook is working just fine, but you may not have removed reflection usage for something inside the hook. ;)
     
  7. What is it you use to call OnItemUse now then as I can't seem to get it to work.
    Here's the error:

    Failed to call hook 'OnItemUse' on plugin 'PillsHere v3.0.2' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.PillsHere.OnItemUse (.Item item, Int32 amountToUse) [0x00000] in :0 at Oxide.Plugins.PillsHere.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in :0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in :0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in :0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in :0
    [DOUBLEPOST=1515195342][/DOUBLEPOST]Sorry if the error is obvious but I don't seem to understand what's wrong.
     
  8. Wulf

    Wulf Community Admin

    Right, you need to remove the reflection usage with lastValue.
     
  9. Sorry but I'm not quite sure what you mean by reflection use with lastValue

    Apologies as this is obviously noobie stuff
    [DOUBLEPOST=1515196876][/DOUBLEPOST]
    I think I figured it out, do you mean the removal of the player variable as it's not called via the hook?
    [DOUBLEPOST=1515197513][/DOUBLEPOST]
    Nope :<