ZH-CN/GetAccountIP: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
m (Обновление информации) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Server function}} | {{Server function}} | ||
__NOTOC__ | __NOTOC__ | ||
{{New feature/item|3. | {{New feature/item|3.156|1.5.5|11747| | ||
此函数用于获取[[帐户]]的IP地址. | 此函数用于获取[[帐户]]的IP地址. | ||
}} | }} | ||
Line 13: | Line 13: | ||
*'''theAccount:''' 您希望获得的IP的[[帐户]]. | *'''theAccount:''' 您希望获得的IP的[[帐户]]. | ||
=== | ===返回值=== | ||
返回包含帐户IP的字符串,如果帐户不存在或向函数传递了无效参数,则返回“false”. | 返回包含帐户IP的字符串,如果帐户不存在或向函数传递了无效参数,则返回“false”. | ||
Line 27: | Line 27: | ||
==See Also== | ==See Also== | ||
{{Account_functions}} | {{Account_functions}} | ||
[[en:GetAccountIP]] | |||
[[ru:getAccountIP]] | |||
[[zh-cn:GetAccountIP]] | [[zh-cn:GetAccountIP]] |
Latest revision as of 17:09, 12 April 2021
语法
string getAccountIP ( account theAccount )
OOP 语法 什么是OOP?
- 方法: account:getIP(...)
- 变量: .ip
必填参数
- theAccount: 您希望获得的IP的帐户.
返回值
返回包含帐户IP的字符串,如果帐户不存在或向函数传递了无效参数,则返回“false”.
示例
当一个玩家登录到他的帐户时,这个例子会在debugscript中声明.
function outputOnLogin ( previous_account, current_account, auto_login ) --当玩家登录时 outputDebugString(getPlayerName(source) .. " logged into his account with IP " .. getAccountIP(current_account)) -- 将其公布到debugscript中 end addEventHandler("onPlayerLogin", getRootElement(), outputOnLogin) --添加事件处理程序
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