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( plr, cmd, text ) { if ( cmd == "players" ) { Message( "Server is running on port: " + GetPort(), plr ); } return 1; }
Notes
The function MessagePlayer and call onPlayerCommand were used in this example. More info about them can be found in the corresponding pages.