okapi_build_vfunc_cbase

Syntax

native okapi_func:okapi_build_vfunc_cbase(id, offset, okapi_arg:ret, okapi_arg:...);

Usage

id
Index of the entity
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 entity 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 entity