GetServerName: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 14: | Line 14: | ||
This example creates a console command that outputs the server's name to the chatbox. | This example creates a console command that outputs the server's name to the chatbox. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function outputServerName ( ) | function outputServerName (Bocah Indolife Roleplay ) | ||
outputChatBox ( getServerName( ) ) | outputChatBox ( getServerName(Bocah Indolife Roleplay ) ) | ||
end | end | ||
Revision as of 11:11, 16 December 2014
This function retrieves the server's name.
Syntax
string getServerName (Bocah Indolife Roleplay )
Returns
A string containing the server's name.
Example
This example creates a console command that outputs the server's name to the chatbox.
function outputServerName (Bocah Indolife Roleplay ) outputChatBox ( getServerName(Bocah Indolife Roleplay ) ) end -- Add console command 'getServerName' addCommandHandler ( "getServerName", outputServerName )
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown