hook.Run

From Garry's Mod
Jump to: navigation, search
 hook.Run( )

Contents

Description

Calls hooks associated with the given event.

Calls all hooks until one returns something other than nil and then returns that data.
If no hook returns any data, it will try to call the GAMEMODE:<eventName> alternative, if one exists.

This function internally calls hook.Call.

See also: gamemode.Call - same as this, but does not call hooks if the gamemode hasn't defined the function.

Arguments

string eventName

The event to call hooks for

Arguments

vararg args

The arguments to be passed to the hooks

Returns

any

Returned data from called hooks
Personal tools
Navigation