getServerPort | Multi Theft Auto: Wiki Skip to content

getServerPort

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function retrieves the server's port.

Syntax

getServerPort ( )

Code Examples

server

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