GetServerPort

From Multi Theft Auto: Wiki
Revision as of 11:29, 16 December 2014 by Glossy (talk | contribs) (→‎Syntax)
Jump to navigation Jump to search

This function retrieves the server's port.

Syntax

int getServerPort (22005 )

Returns

An integer corresponding to the server's port.

Example

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

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

See Also