Squirrel/Server/Functions/Server/SetPort
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ Changes the port your server will be running on. == Syntax == <code>bool SetPort( int port )</code> == Arguments == * '''port''' - This is the port you want the server to be ...) |
m (Squirrel/Functions/Server/SetPort moved to Squirrel/Server/Functions/Server/SetPort: Separating from clientside scripts) |
Revision as of 04:20, 14 November 2009
Changes the port your server will be running on.
Syntax
bool SetPort( int port )
Arguments
- port - This is the port you want the server to be running on
Example
This example will change the server port when a player types '/setport 5192'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "setport" ) { SetPort( text.tointeger() ); } }
Notes
The call OnPlayerCommand was also used in the example. More info about this in the corresponding page.