- Documentation
- Server functions
- getAccountsByData
Function
getAccountsByData
Returns the accounts whose data under a key equals the given value.
Syntax
table getAccountsByData(string dataName, mixed value)Arguments
dataNamestring- The key.
valuemixed- The value.
Returns
A table of accounts.
Example
for _, acc in ipairs(getAccountsByData("vip", true)) do
outputServerLog("VIP: " .. getAccountName(acc))
end