Role.Has
Shared
boolean Lyn.Player.Role.Has(Player target, string|table role)FunctionDescription
Returns whether the specified player has the given role(s). Supports string, array-style, and dictionary-style table inputs.
Params
Playertarget
Returns
Whether the player has the role (or any of the roles if table provided).
Example:
-- Single role
if Lyn.Player.Role.Has(Entity(1), "admin") then
print("Player has admin role.")
end
-- Multiple roles (any match)
if Lyn.Player.Role.Has(Entity(1), {"admin", "moderator", superadmin = true}) then
print("Player has at least one of the roles.")
end