Garry's Mod Wiki

hook.Run

hook.Run

  any hook.Run( string eventName, vararg args )

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 any
Returned data from called hooks.

Special Pages


Wikis

?

Render Time: 45ms

DB GetPage 25
Generate Html 5
SaveChanges (1) 6
Render Body 0
Render Sidebar 7