Revision Difference
GM:ShutDown#553145
<function name="ShutDown" parent="GM" type="hook">
<ishook>yes</ishook>⤶
<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.
<warning><page>Player:SteamID</page>, <page>Player:SteamID64</page>, and the like will return nil for the listen host here but work fine for other players.</warning>
</description>
<realm>Shared</realm>
<predicted>No</predicted>⤶
</function>
<example>
<description>Prints into the players chat: `Server Is Restarting.`.</description>
<code>hook.Add( "ShutDown", "ServerShuttingDown", function()
Entity( 1 ):PrintMessage( HUD_PRINTTALK, "Server Is Restarting." )
end )</code>
<output>Server Is Restarting. When then the server is Shutting down, etc.</output>
</example>