Hi, is it possible to register a hook to a custom function?
Example
Oxide.RegisterHook("OnTick", myFunct())
Register hooks via function possible?
Discussion in 'Rust Development' started by Inofix, Mar 4, 2017.
-
Wulf Community Admin
What would be the point of that?
-
Just for my own learning purpose, trying to register hooks in a class constructor
-
Wulf Community Admin
You should also be able to register hooks using the [HookMethod("MethodName")] attribute on the target method. This is for custom methods, not for overwriting another existing method such as OnTick. -
For example I'm making multiple events classes with a base class.
I need to register certain hooks for some events once the class gets initialized and unregister the hooks after deconstruction.
Best performance way would be to forward from the main hook method to my class method i think. -
Wulf Community Admin