DHookGamerules Function

Hook gamerules

int DHookGamerules(Handle setup, bool post, DHookRemovalCB removalcb, DHookCallback callback)

Parameters

Handle setup

Setup handle to use to add the hook.

bool post

true to make the hook a post hook. (If you need to change the return value or need the return value use a post hook! If you need to change params and return use a pre and post hook!)

DHookRemovalCB removalcb

Callback for when the hook is removed (Game rules hooks are auto-removed on map end and will call this callback)

DHookCallback callback

Optional callback function, if not set here must be set when creating the hook.

Return Value

INVALID_HOOK_ID on fail a hookid on success

Errors

Invalid setup handle, invalid address, invalid hook type or invalid callback.