GetServerPort

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 port.

Syntax

int getServerPort ( )

Returns

An integer corresponding to the server's port.

Example

This example Sends out the serverPort when you type: /serverport

function outputServerPort ( )
        local serverPort = getServerPort() 
	outputChatBox (" Server Port: "..serverPort.." ") --Output Serverport in Chatbox
end
addCommandHandler ( "serverport", outputServerPort )  --add the command Handler

See Also