Squirrel/Server/Functions/Server/SetPassword
From Liberty Unleashed Wiki
(Difference between revisions)
m (→Notes: Fixed broken link to onPlayerCommand) |
|||
Line 26: | Line 26: | ||
=== Notes === | === Notes === | ||
− | The call [[Squirrel/Events/Player/ | + | The call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was also used in the example. More info about this in the corresponding page. |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Functions/Server}} | {{Squirrel/Functions/Server}} |
Revision as of 20:31, 7 September 2011
This will change the password required to connect the server.
Syntax
bool SetPassword( string pass )
Arguments
- pass - The new password needed to join the server
Example
This command will change the server password when a player types '/setpass ubersecret'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "setpass" ) { SetPassword( text ); } }
Notes
The call onPlayerCommand was also used in the example. More info about this in the corresponding page.