GetAccountByID: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Обновление информации) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
{{New feature/item|3. | {{New feature/item|3.156|1.5.5|12217| | ||
This function returns the account with the specific ID. | This function returns the account with the specific ID. | ||
}} | }} | ||
Line 33: | Line 33: | ||
==See Also== | ==See Also== | ||
{{Account_functions}} | {{Account_functions}} | ||
[[en:GetAccountByID]] | |||
[[ru:GetAccountByID]] | |||
[[zh-cn:GetAccountByID]] | [[zh-cn:GetAccountByID]] |
Latest revision as of 17:13, 12 April 2021
Syntax
account getAccountByID ( int id )
Required Arguments
- id: The ID to get account from
Returns
Returns account associated with specified ID. Returns false if invalid arguments were specified or there is no account with this ID.
Example
This example adds command getAccount that outputs the account-name of the account with ID.
addCommandHandler("getAccount", function (player, cmd, id) id = tonumber(id) local account = getAccountByID(id) if account then outputChatBox("The name of the account with that ID is: "..getAccountName(account), player) else outputChatBox("There is no account with this ID.", player) 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