getAccountsByIP | Multi Theft Auto: Wiki Skip to content

getAccountsByIP

Client-side
Server-side
Shared

This function returns a table containing all accounts that were logged onto from specified IP-address.

OOP Syntax Help! I don't understand this!

Syntax

table|false getAccountsByIP ( string IP )
Required Arguments
  • IP: The IP to get accounts from.

Returns

  • table|false: accounts table

Returns table containing the accounts associated with specified IP-address. Returns false if invalid arguments were specified.

Code Examples

server

This example adds command getAccounts that outputs the number of accounts a player has in the chatbox.

addCommandHandler("getAccounts", function (player, cmd)
local ip = getPlayerIP(player)
local accounts = getAccountsByIP(ip)
outputChatBox("You have " .. #accounts .. " accounts.", player)
end)