- Documentation
- Server functions
- setAccountPassword
Function
setAccountPassword
Changes an account's password.
Syntax
bool setAccountPassword(account theAccount, string password)Arguments
theAccountaccount- The account.
passwordstring- The new password.
Returns
true on success.
Example
addCommandHandler("zmienhaslo", function(player, cmd, old, new)
local account = getPlayerAccount(player)
if isGuestAccount(account) or not getAccount(getAccountName(account), old) then
outputChatBox("Złe hasło.", player, 255, 0, 0)
return
end
setAccountPassword(account, new)
outputChatBox("Hasło zmienione.", player, 0, 255, 0)
end)