GetAccountsByData: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
m (Обновление информации) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
{{New feature/item|3. | {{New feature/item|3.156|1.5.5|11747| | ||
This function returns a [[table]] containing all accounts with specified dataName and value (set with setAccountData). | This function returns a [[table]] containing all accounts with specified dataName and value (set with setAccountData). | ||
}} | }} | ||
Line 30: | Line 30: | ||
==See Also== | ==See Also== | ||
{{Account_functions}} | {{Account_functions}} | ||
[[en:GetAccountsByData]] | |||
[[ru:getAccountsByData]] | |||
[[zh-cn:GetAccountsByData]] | [[zh-cn:GetAccountsByData]] |
Latest revision as of 17:10, 12 April 2021
Syntax
table getAccountsByData ( string dataName, string value )
OOP Syntax Help! I don't understand this!
- Note: This function is a static function underneath the Account class.
- Method: Account.getAllByData(...)
Required Arguments
- dataName: The name of the data
- value: The value the dataName should have
Returns
Returns table containing the accounts associated with specified value at dataName. Returns false if invalid arguments were specified.
Example
Useless example to show how it works.
addCommandHandler("accountsbydata", function (player) local account = getPlayerAccount(player) setAccountData(account, "test", "hello") local accounts = getAccountsByData("test", "hello") outputChatBox(getAccountName(accounts[1]), player) 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