Revision Difference
GM:ShutDown#544261
<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", "ServerShutingDown", function()⤶
Entity( 1 ):PrintMessage( HUD_PRINTTALK, "Server Is Restarting." )⤶
end )</code>⤶
<output>Server Is Restarting. When then the server Shuting down etc</output>⤶
</example>⤶