Garry's Mod Wiki

Garry's Mod Wiki

  vararg hook.Run( string eventName, ... )

Description

Calls all hooks associated with the given event 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

1 string eventName
The event to call hooks for.
2 vararg args
The arguments to be passed to the hooks.

Returns

1 vararg
Return data from called hooks. Limited to 6 return values.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...