Observe
Definition
Observe(className, method, callback) -- alias of ObserveBefore()ObserveBefore(className, method, callback)ObserveAfter(className, method, callback)--
-- ObserveBefore()
--
-- @param string className The parent class name
-- @param string method The method name to target
-- @param function callback The callback function
--
ObserveBefore('className', 'method', function(self [, arg1, arg2, ...])
-- method() has just been called
end)Representation
Usage Examples
Give money each time the player crouches:
Give money as long as the player is crouched:
Observe event send to an AnimationControllerComponent (click on function's name in NativeDB to copy the full name in your clipboard):
Advanced Example
Give money when the player is crouched and in ADS:
Last updated