SetServerName

From Onset Developer Wiki
SetServerName

Type: Function
Context: Server
Introduced: v1.0

Description

Sets the display name of the server.

Syntax

SetServerName(ServerName)

Parameters

  • ServerName
    The name of the server.

Return Value

  • This function doesn't return a value.

Example

local servername = "Onset Server"
local max = GetMaxPlayers()
AddEvent("OnPlayerJoin", function()
	SetServerName("[" .. GetPlayerCount() .. "/" .. max .. "] " .. servername)
end)

See also