private void OnItemPickup(BasePlayer player, Item item)
This Hook no longer seems to be doing anything on my server, and it's also broken in GatherManager.
I saw no replacement for this hook, or any mention of it being gone at all, any explanation as to why it's not working/why it's missing?
Solved OnItemPickUp no longer working
Discussion in 'Rust Development' started by Shady757, Dec 4, 2015.
-
Wulf Community Admin
That was actually changed and I had forgotten about it when I was filtering through the recent changes to push. It needs to be deprecated though, but it was renamed to indicate more of what it handles.
OnCollectiblePickup is the new hook name I believe, same parameters except swapped. OnWeaponThrown was also renamed to OnExplosiveThrown, though that wasn't intended to be the final name. Either way, they'll be deprecated.
@Shady757, I edited my original post to reflect that the parameters of OnCollectiblePickup were actually swapped to match the other hooks.Last edited: Dec 4, 2015 -
[Oxide] 7:32 PM [Error] Failed to call hook 'OnCollectiblePickup' on plugin 'Test' (InvalidCastException: Cannot cast from source type to de
stination type.)
When using the Hook at all, any idea why that is?
EDIT: Nevermind, didn't see your edit. -
-
Wulf Community Admin