Skip to main content

Chat.Send

Shared
Lyn.Player.Chat.Send(Player|table|string target, string msg, table|nil tbl)Function

Description

Sends a formatted chat message to a player, a table of players, "*" for everyone, or Lyn.Console to print to the server console.

Clientside this always writes to the local player's chat.

Params

  1. Player | table | string target
  2. string msg

    Raw text or a translation key (#lyn.my.key).

  3. table | nil tbl

    Format data. P = player, T = targets, D = duration, anything else fills %placeholders%.

Example:

Lyn.Player.Chat.Send("*", "{P} says hi to {T}", { P = caller, T = targets })
tip

Inside a command's :Execute, prefer LYN_NOTIFY so the Lyn.Command.Notify hook can override the output.