- Documentation
- Accounts
Category
Accounts
All Lua functions and events in the Accounts category, on the server and the client.
Server functions 24
addCreates a new account on the server. The password is stored as a secure hash, never in plain text.Account copyCopies all data from one account to another.Account Data getReturns the account with the given name. With a password it returnsAccount falsewhen the password does not match.getReturns the account with the given number (Account By ID getAccountID).getReturns account data stored under a key. Account data is persistent: it stays after the player leaves and after a server restart.Account Data getReturns the account's permanent number. Assigned on the first request and never changes afterwards.Account ID getReturns the IP address remembered at the last login.Account IP getReturns the account name.Account Name getReturns the player logged into this account. An account can be logged in by only one player at a time.Account Player getReturns all accounts on the server.Accounts getReturns the accounts whose data under a key equals the given value.Accounts By Data getReturns the accounts last used from the given IP address.Accounts By IP getReturns the accounts used from the given Client ID.Accounts By Serial getReturns the Client ID remembered when logging into this account.Account Serial getReturns the account type:Account Type "guest"(not logged in) or"player".getReturns all account data as a key-value table.All Account Data isChecks whether the account is a guest account, i.e. the player is not logged in.Guest Account logLogs a player into an account. FiresIn onPlayerLogin. An account can be logged in by only one player at a time.logLogs a player out of their account. FiresOut onPlayerLogout.removeDeletes an account together with its data.Account setStores account data under a key. The value is kept permanently (also after a server restart).Account Data setRenames an account, moving all its data.Account Name setChanges an account's password.Account Password setStores the Client ID assigned to the account.Account Serial