Garry's Mod Wiki

hook.Run

any hook.Run( string eventName, vararg args )

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

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

Page Links


Special Pages


Wikis

?

Render Time: 52ms

DB GetPage 23
Generate Html 7
SaveChanges (1) 8
Render Body 0
Render Sidebar 12