Squirrel/Server/Functions/Server/SetPassword

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|SetPassword}}
 
This will change the password required to connect the server.
 
This will change the password required to connect the server.
  

Revision as of 10:12, 11 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This will change the password required to connect the server.

Syntax

  1. 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'.

  1.  
  2. function OnPlayerCommand( id, cmd, text )
  3. {
  4. if ( cmd == "setpass" )
  5. {
  6. SetPassword( text );
  7. }
  8. }
  9.  

Notes

The call OnPlayerCommand was also used in the example. More info about this in the corresponding page.

Related Functions

Template:Squirrel/Functions/Server

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox