Squirrel/Server/Functions/Server/SetPassword

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Notes: Fixed broken link to onPlayerCommand)
m (Redirect issue fix)
 
Line 30: Line 30:
 
== Related Functions ==
 
== Related Functions ==
  
{{Squirrel/Functions/Server}}
+
{{Squirrel/Server/Functions/Server}}

Latest revision as of 18:34, 15 January 2012

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

This will change the password required to connect the server.

[edit] Syntax

  1. bool SetPassword( string pass )

[edit] Arguments

  • pass - The new password needed to join the server

[edit] 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.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox