Garry's Mod Wiki

GM:ShutDown

  GM:ShutDown()

Description

Called whenever the Lua environment is about to be shut down, for example on map change, or when the server is going to shut down.

Example

Prints into the players chat: Server Is Restarting..

hook.Add( "ShutDown", "ServerShuttingDown", function() Entity( 1 ):PrintMessage( HUD_PRINTTALK, "Server Is Restarting." ) end )
Output: Server Is Restarting. When then the server is Shutting down, etc.