Skip to main content

Role.HasDeep

Shared
boolean Lyn.Player.Role.HasDeep(Player target, string role)Function

Description

Returns whether the specified player has the given role or any roles that inherit from it.

For example, if a player has the "admin" role, and "admin" extends "user", then Lyn.Player.Role.HasDeep(player, "user") will return true.

Params

  1. Player target
  2. string role

Returns

  1. Whether the player has the role or any roles that inherit from it.

Example:

print(Lyn.Player.Role.HasDeep(Entity(1), "user"))