Method Maps5
SymbolDescription
DHookParamRepresents the parameters of the hooked function.
DHookReturnRepresents the return value of the hooked function.
DHookSetupBase method map for common functions between virtual hooks and detours.
DynamicDetourA DynamicDetour is a way to hook and block any function in memory. Given the address of a function, it can call a callback in your script whenever the function gets called. The callback has access to all parameters of the function as well as the return value. Internally this works by replacing the first instructions of the function with a jump to our own code. This means that the signature used to find the function address in the first place might not match anymore after a detour. If you need to detour the same function in different plugins make sure to wildcard \x2a the first 6 bytes of the signature to accommodate for the patched jump introduced by the detour.
DynamicHookA DynamicHook allows to hook a virtual function on any C++ object. Currently CBaseEntity and CGameRules have a convenience API for easy entity hooking, but it's possible to provide a raw this-pointer to hook any object in memory too. Internally this intercepts function calls by replacing the function pointer in the virtual table of the object with our own function.
Type Sets3
Defines1
SymbolDescription
INVALID_HOOK_ID
Functions32
SymbolDescription
DHookAddEntityListenerAdds an entity listener hook
DHookAddParamAdds param to a hook setup
DHookCreateCreates a hook
DHookCreateDetourCreates a detour
DHookCreateFromConfSetup a detour or hook for a function as described in a "Functions" section in gamedata.
DHookDisableDetourDisable the detour of the function described in the hook setup handle.
DHookEnableDetourEnable the detour of the function described in the hook setup handle.
DHookEntityHook entity
DHookGamerulesHook gamerules
DHookGetParamGet param value (Use only for: int, entity, edict, bool or float param types)
DHookGetParamAddressGet param address (Use only for ptr param types)
DHookGetParamObjectPtrStringGets an objects string variable value
DHookGetParamObjectPtrVarGets an objects variable value
DHookGetParamObjectPtrVarVectorGets an objects vector variable value
DHookGetParamStringGet string param value
DHookGetParamVectorGet vector param value
DHookGetReturnGet return value (Use only for: int, entity, bool or float return types)
DHookGetReturnStringGet return string value
DHookGetReturnVectorGet return vector value
DHookIsNullParamChecks if a pointer param is null
DHookRawHook a raw pointer
DHookRemoveEntityListenerRemoves an entity listener hook
DHookRemoveHookIDRemove hook by hook id
DHookSetFromConfLoad details for a vhook or detour from a gamedata file.
DHookSetParamSet param value (Use only for: int, entity, edict, bool or float param types) An entity param type can be set to NULL using INVALID_ENT_REFERENCE (-1).
DHookSetParamObjectPtrVarSets an objects variable value
DHookSetParamObjectPtrVarVectorSets an objects vector variable value
DHookSetParamStringSet string param value
DHookSetParamVectorSet vector param value
DHookSetReturnSet return value (Use only for: int, entity, bool or float return types) An entity return type can be set to NULL using INVALID_ENT_REFERENCE (-1).
DHookSetReturnStringSet return string value
DHookSetReturnVectorSet return vector value