GetAccountsByIP: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
===Returns=== | ===Returns=== | ||
Returns ''[[table]]'' containing the accounts associated with specified | Returns ''[[table]]'' containing the accounts associated with specified IP-address. Returns ''false'' if invalid arguments were specified. | ||
==Example== | ==Example== | ||
Revision as of 22:03, 1 July 2018
This function returns a table containing all accounts that were logged onto from specified IP-address.
Syntax
table getAccountsByIP ( string ip )
OOP Syntax Help! I don't understand this!
- Note: This function is a static function underneath the Account class.
- Method: Account.getAllByIP(...)
Required Arguments
- ip: The IP to get accounts from
Returns
Returns table containing the accounts associated with specified IP-address. 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 ip = getPlayerIP(player)
local accounts = getAccountsByIP(ip)
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