Exports

Here you will find a list of server-side exports that you can use with the chat.

Send a message to a specific players

exports['jc_chat']:SendMessageToPlayer(playerId, authorId, authorName, color, message, templateId)

Parameters Explained

  • playerId: Player ID of the player sending the message

  • authorId: ID of the player sending the message

  • authorName: Name that will appear as the author of the message

  • color: RGB table of the name color

  • message: The content of the message you want to send

  • templateId: ID of a style template for the message

Sends a global message to all players

exports['jc_chat']:BroadcastMessage(authorId, authorName, color, message, templateId)

Parameters Explained

  • authorId: Message author ID. Can be used to show who sent it internally

  • authorName: Name that will appear as the author of the message. If not sent, it may appear as

  • color: RGB table of the name color

  • message: The content of the message you want to send

  • templateId: ID of a style template for the message

Sends a message only to nearby players

exports['jc_chat']:SendProximity(sourceId, name, color, message, templateId, radiusMeters)

Parameters Explained

  • sourceId: Player ID of the player sending the message

  • name: Name that will appear as the author of the message

  • color: RGB table of the name color

  • message: The content of the message you want to send

  • templateId: ID of a style template for the message

  • radiusMeters: Maximum distance in meters for other players to see the message

Adds command suggestion to single or all player chat

exports['jc_chat']:AddSuggestion(playerId, command, helpText, paramsArray)

Parameters Explained

  • playerId: Player ID or nil for all

  • command: Command (e.g. /help)

  • helpText: Help text description

  • paramsArray: Parameters (optional)

Last updated