Gamemode.Initialize

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameInitialize
SyntaxGM:Initialize( )
DescriptionCalled when the gamemode loads and starts.
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.Initialize]Gamemode.Initialize [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionPrints stuff when the gamemode loads and starts.
Used onNewerShared.png
Code
 
function Init_Gamemode()
  Msg( "stuff\n" )
end
hook.Add( "Initialize", "initializing", Init_Gamemode );
 
Outputstuff


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox