Gamemode.Tick
From GMod Wiki
| Event Hook | |
| Hook Name | Tick |
| Syntax | GM:Tick( ) |
| Description | Like Think except called every tick on both client and server. |
| Returns | Nil |
| Lua State | |
| BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.Tick]Gamemode.Tick [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
| Description | Prints a line of text server tick. |
|---|---|
| Used on | |
| Code | function SecondPrint() Msg("This is printed every server tick\n") end hook.Add("Tick", "SecondPrint", SecondPrint) |
| Output | N/A |
Additional Notes
- Runs slower than the Think hook on a default server
- This hook is not called on dedicated servers at all until a client starts to connect to the server.