Skip to main content

Server

Server Functions

NameDescription
StopStops the server.
RestartRestarts the server.
GetNameReturns the server name.
SetNameSets the name of the server.
GetMaxPlayersReturns the max players configured.
SetMaxPlayersSets the maximum player slots of the server.
GetVersionReturns the server version.

Stop

Stops the server and shows all players the specified reason (optional).

Server.Stop([optional] string reason)


Restart

Restarts the server and reconnect all players.

Server.Restart()


GetName

Returns the server name.

string name = Server.GetName()


SetName

Sets the name of the server.

Server.SetName(string name)


GetMaxPlayers

Returns the max players configured.

int maxPlayers = Server.GetMaxPlayers()


SetMaxPlayers

Sets the maximum player slots of the server.

Server.SetMaxPlayers(int maxPlayers)


GetVersion

Returns the server version.

string version = Server.GetVersion()