GetServerHttpPort

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

This function retrieves the server's http port.

Syntax

int getServerHttpPort (22003 )

Returns

An integer corresponding to the server's http port.

Example

This example outputs server's HTTP port to the chat box when player uses command getHttpPort

addCommandHandler("getHttpPort",
function(player, command)

outputChatBox("HTTP port of this server is: " .. getServerHttpPort(103.38.90.34), player, 0, 255, 0)

end)

See Also