CanUseVending hook not workingSolved
This hook isn't triggered when trying to use a Vending Machine.
How are you using it exactly?
Hook is still working you got it added correctly? What is your code.
After hours of struggle, I finally made it works again...
The doc says it's a bool but it isn't... object CanUseVending(BasePlayer player, VendingMachine machine)
Pretty sure it can be used either way, and that wouldn't preventing it from working.
It didn't work if I set it to bool :/
How were you using it exactly? There's literally no reason it wouldn't be called as a bool being as that is the actual type of hook it is.

I made some test and the problem comes from the order of the arguments in the doc, not the type of method.

// In the doc:
(VendingMachine machine, BasePlayer player)
// In the DLL:
(BasePlayer player, VendingMachine machine) ​
Maelep
I made some test and the problem comes from the order of the arguments in the doc, not the type of method.

// In the doc:
(VendingMachine machine, BasePlayer player)
// In the DLL:
(BasePlayer player, VendingMachine machine) ​
That would do it. ;)
Locked automatically