Squirrel/Server/Functions/Server/SetPassword
From Liberty Unleashed Wiki
(Difference between revisions)
m (Redirect issue fix) |
|||
(One intermediate revision by one user not shown) | |||
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/Server/Functions/Server}} |
Latest revision as of 18:34, 15 January 2012
This will change the password required to connect the server.
[edit] Syntax
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'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "setpass" ) { SetPassword( text ); } }
[edit] Notes
The call onPlayerCommand was also used in the example. More info about this in the corresponding page.