Gamemode.ShutDown

From GMod Wiki

Revision as of 13:45, 31 July 2011 by ClavusElite (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameShutDown
SyntaxGM:ShutDown( )
DescriptionCalled when the Lua system is about to shut down (when the map changes, server shuts down or the client disconnects).
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.ShutDown]Gamemode.ShutDown [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionPrints a line when the server (or client) shuts down
Used onNewerShared.png
Code
 
local function ImaShuttingDown()
    MsgAll( "The server has shut down." )
end
hook.Add( "ShutDown", "shutingdown", ImaShuttingDown )
 
OutputThe server has shut down.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox