SetServerName

From Onset Developer Wiki
Revision as of 14:21, 26 June 2021 by FlyingFork (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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