ZH-CN/getAccountSerial: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
Qwe7769611 (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
*'''theAccount:''' 要从中获取序列号的帐户 | *'''theAccount:''' 要从中获取序列号的帐户 | ||
=== | ===返回值=== | ||
返回包含序列号的“字符串”,如果从未使用过帐户,则该字符串为空。如果指定了无效参数,则返回“false”. | 返回包含序列号的“字符串”,如果从未使用过帐户,则该字符串为空。如果指定了无效参数,则返回“false”. | ||
Line 39: | Line 39: | ||
[[ru:getAccountSerial]] | [[ru:getAccountSerial]] | ||
[[ | [[en:getAccountSerial]] |
Revision as of 07:58, 5 February 2021
此函数返回上次登录到指定账户account的序列serial。
语法
string getAccountSerial ( account theAccount )
OOP 语法 什么是OOP?
- 方法: account:getSerial(...)
- 变量: .serial
Required Arguments
- theAccount: 要从中获取序列号的帐户
返回值
返回包含序列号的“字符串”,如果从未使用过帐户,则该字符串为空。如果指定了无效参数,则返回“false”.
示例
此示例添加命令“getaccserial”,该命令在聊天框中输出给定帐户的序列号.
addCommandHandler("getaccserial", function (player, cmd, accountName) if accountName then local account = getAccount(accountName) if (account) then outputChatBox("Serial: " .. getAccountSerial(account)) else outputChatBox("Account not found") end end end )
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