Garry's Mod Wiki

GM:ShutDown

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.

Player:SteamID, Player:SteamID64, and the like will return nil for the listen host here but work fine for other players.

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.

Special Pages


Wikis

?

Render Time: 20ms

DB GetPage 3
Generate Html 2
SaveChanges (1) 6
Render Body 0
Render Sidebar 7