GetAccountsBySerial: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server function}} {{New items|4.0132|1.4| This function returns a table containing all accounts that were logged onto from specified serial. If the serial is...") |
(OOP syntax added) |
||
Line 10: | Line 10: | ||
table getAccountsBySerial ( string serial ) | table getAccountsBySerial ( string serial ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||Account.getAllBySerial||}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''serial:''' The [[serial]] to get accounts from | *'''serial:''' The [[serial]] to get accounts from |
Revision as of 04:10, 12 July 2014
Syntax
table getAccountsBySerial ( string serial )
OOP Syntax Help! I don't understand this!
- Method: Account.getAllBySerial(...)
Required Arguments
- serial: The serial to get accounts from
Returns
Returns table containing the accounts associated with specified serial. Returns false if invalid arguments were specified.
Example
This example adds command getAccounts that outputs the number of accounts a player has in the chat box.
addCommandHandler("getAccounts", function (player, cmd) local serial = getPlayerSerial(player) local accounts = getAccountsBySerial(serial) outputChatBox("You have " .. #accounts .. " accounts.", 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