ServerExit

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
ServerExit

Type: Function
Context: Server
Introduced: v1.0

Description

Shutdowns the server.

Syntax

ServerExit([, ExitMessage])

Parameters

  • ExitMessage (optional)
    A shutdown message.

Return Value

  • This function doesn't have a return value.

Example

AddCommand("shutdown", function(playerid)
	AddPlayerChat(playerid, "Shutting down the server...")

	ServerExit("Server shutdown by"..GetPlayerName(playerid))
	return
end)

See also