Garry's Mod Wiki

GM:Initialize

GM:Initialize()

Description

Called after the gamemode loads and starts.

Example

"hi" will be printed to the console when the gamemode initializes.

function GM:Initialize() print("hi" ) end -- That way you are overriding the default hook. -- You can use hook.Add to make more functions get called on initialization. hook.Add( "Initialize", "some_unique_name", function() print( "Initialization hook called" ) end )
Output: Initializtion hook called and hi

Page Links


Special Pages


Wikis

?

Render Time: 62ms

DB GetPage 26
Generate Html 0
SaveChanges (1) 17
Render Body 0
Render Sidebar 15