GetServerName

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function retrieves the server's name.

Syntax

string getServerName ( )

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 ( )
	outputChatBox ( getServerName( ) )
end

-- Add console command 'getServerName'
addCommandHandler ( "getServerName", outputServerName )

See Also