ZH-CN/getAccountSerial: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
m (Добавление языков) |
||
(One intermediate revision by one other user not shown) | |||
Line 14: | Line 14: | ||
*'''theAccount:''' 要从中获取序列号的帐户 | *'''theAccount:''' 要从中获取序列号的帐户 | ||
=== | ===返回值=== | ||
返回包含序列号的“字符串”,如果从未使用过帐户,则该字符串为空。如果指定了无效参数,则返回“false”. | 返回包含序列号的“字符串”,如果从未使用过帐户,则该字符串为空。如果指定了无效参数,则返回“false”. | ||
Line 38: | Line 38: | ||
[[ru:getAccountSerial]] | [[ru:getAccountSerial]] | ||
[[en:getAccountSerial]] | |||
[[zh-cn:getAccountSerial]] | [[zh-cn:getAccountSerial]] |
Latest revision as of 13:04, 12 April 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