Skip to main content

Role.Add

Server
Lyn.Player.Role.Add(Player target, string role, number|nil duration, function|nil callback)Function

Description

Adds the specified role to the player for an optional duration (in seconds). If duration is not specified, the role is added permanently.

Params

  1. Player target
  2. string role
  3. number | nil duration
    in seconds
  4. function | nil callback

    Callback function when operation completes/fails.

    Callback params(s):

    1. string | nil err

      Error message if failed, or nil if successful.

Example:

Lyn.Player.Role.Add(Entity(1), "admin")