Skip to main content

Server

Quick Reference​

NameTypeDescription
StopServerStops the server.
RestartServerRestarts the server.
GetNameServerReturns the server name.
SetNameServerSets the name of the server.
GetMaxPlayersServerReturns the max players configured.
SetMaxPlayersServerSets the maximum player slots of the server.
GetVersionServerReturns the server version.

Server Functions​

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()