- Documentation
- Shared functions
- getServerName
Function
getServerName
Returns the server name from server-config.json (the one players see in the launcher's server list).
Syntax
string getServerName()Returns
The server name.
Example
addEventHandler("onPlayerJoin", root, function()
outputChatBox("Witaj na " .. getServerName() .. "!", source)
end)
Notes
Client. Works in a client script too (the name from the moment of joining).