Skip to main content

Role.Iter

Shared
function, table, number Lyn.Player.Role.Iter(Player target)Function

Description

Returns an iterator for all roles the specified player has.

Params

  1. Player target

Returns

  1. The iterator function.

  2. The table of roles.

  3. The current index.

Example:

for idx, role in Lyn.Player.Role.Iter(Entity(1)) do
print(idx, role)
end

-- Output:
-- 1 superadmin
-- 2 user