From GMod Wiki
|Internal Function: hook.Call|
|hook.Call is an internal function. This means you will be able to call it, but you really shouldn't.|
hook.Call( String name, Table gm[, ...] )
Where is this used?
|Called by the engine to call a hook added by hook.Add and a gamemode hook on GAMEMODE:TheHookName|
|Part of Library:||Hook|
|BBCode Link:||[b][url=http://wiki.garrysmod.com/?title=Hook.Call]Hook.Call [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]|
- Be warned, that you should never call any hooks from Garry's Mod itself (like PlayerSpawn). But if you created custom hooks, this function is right for you.
- The second argument can be empty or a GAMEMODE table. If the GAMEMODE table is supplied, hook.Call will try to call every hook created with hook.Add first and then GAMEMODE[name].
- This is similar to gamemode.Call, but with the difference. It will always call hooks created with hook.Add.
- If you used gamemode.Call in your scripts before, hooks created with hook.Add will only be called if they have an equivalent in the GAMEMODE table. Otherwise not.