setServerPassword
Server
Changes the password to join the server. Players already in stay.
bool setServerPassword([string password = nil])
Parameters
| Name | Type | Description |
|---|---|---|
| password | string | The new password. Without it, or empty, the server is open.default nil |
Returns
true once the password is set; false if it is over 32 characters long or has a space.
Example
addCommandHandler("lock", function(player, command, password)
setServerPassword(password)
end)