ZH-CN/copyAccountData: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) (Created page with "__NOTOC__ {{Server function}} 此函数用于将所有数据从一个帐户account复制到另一个帐户. ==语法== <syntaxhighlight lang="lua"> bool copyAccountData...") |
Qwe7769611 (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
*'''theAccount:''' 复制数据的账户 | *'''theAccount:''' 复制数据的账户 | ||
*'''fromAccount:''' 黏贴数据的账户 | *'''fromAccount:''' 黏贴数据的账户 | ||
=== | ===返回值=== | ||
如果帐户有效,则返回“true”,否则返回“false”. | 如果帐户有效,则返回“true”,否则返回“false”. | ||
Line 30: | Line 30: | ||
[[ar:copyAccountData]] | [[ar:copyAccountData]] | ||
[[pl:copyAccountData]] | [[pl:copyAccountData]] | ||
[[en:copyAccountData]] |
Revision as of 07:51, 5 February 2021
此函数用于将所有数据从一个帐户account复制到另一个帐户.
语法
bool copyAccountData ( account theAccount, account fromAccount )
OOP 语法 什么是OOP?
- 方法: account:copyDataTo(...)
必填参数
- theAccount: 复制数据的账户
- fromAccount: 黏贴数据的账户
返回值
如果帐户有效,则返回“true”,否则返回“false”.
例子
此示例在“guest”登录时将帐户数据从其复制到已注册的帐户
function copyDataOnLogin ( previousAccount, currentAccount ) copyAccountData ( currentAccount, previousAccount ) end addEventHandler ( "onPlayerLogin", getRootElement(), copyDataOnLogin )
See Also
- addAccount
- copyAccountData
- getAccount
- getAccountData
- getAccountName
- getAccountPlayer
- getAccountSerial
- getAccounts
- getAccountsBySerial
- getAllAccountData
- getPlayerAccount
- isGuestAccount
- logIn
- logOut
- removeAccount
- setAccountData
- setAccountPassword
- getAccountByID
- getAccountID
- getAccountIP
- getAccountsByData
- getAccountsByIP
- setAccountName