okapi_build_vfunc_ptr

Syntax

native okapi_func:okapi_build_vfunc_ptr(ptr,offset,okapi_arg:ret,okapi_arg:...)

Usage

ptr
Address of the object
offset
Offset of the function in the virtual table
ret
Return type of the method
...
Rest of the types for the arguments of the function

Description

Attaches okapi to a virtual function of an object so you can hook it and call it.

Note

You don't need to pass arg_cbase in the argument list for the entity itself.

Return

Handler to the function attached

Error

Invalid object address