hook.Remove
From GMod Wiki
Revision as of 14:04, 22 October 2009 by Crazy Quebecer (Talk | contribs)
| Function | |
| Syntax |
hook.Remove( String hook, String unique_name ) Where is this used? |
| Description: | |
| Remove a hooked function | |
| Returns: | nil |
| Part of Library: | Hook |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Hook.Remove]Hook.Remove [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | This unhooks the think hook we added in hook.Add |
|---|---|
| Used on | |
| Code | hook.Remove( "Think", "Some unique name" ) |
| Output | N/A |
Additional Notes
- The unique name is to ensure that the hook is only hooked once, even if the code is loaded multiple times, it also serves to add hooks with hook.Add.
- Get a list of hooks from Event Hooks.