Skip to main content

Role.GetAll

Shared
table Lyn.Player.Role.GetAll(Player target)Function

Description

Returns a copy of all roles the specified player has.

Prefer using Lyn.Player.Role.Iter when you only need to loop through a player's roles.

Params

  1. Player target

Returns

  1. Array of all roles the player has.

Example:

PrintTable(Lyn.Player.Role.GetAll(Entity(1)))

-- Output:
-- [1] = superadmin
-- [2] = user

-- Which is: {"superadmin", "user"}