GetPort
From Liberty Unleashed Wiki
This returns the port the server is running on.
Syntax
int GetPort()
Arguments
- None
Example
This will return the server port when a player types '/port'
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "port" ) { MessagePlayer( "Server is running on port: " + GetPort(), id ); } }
Notes
The function MessagePlayer and call OnPlayerCommand were used in in this example. More info about them in corresponding pages.