GetAccountsByIP
Revision as of 05:17, 4 February 2021 by Qwe7769611 (talk | contribs)
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)