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 messageauthorId:ID of the player sending the messageauthorName:Name that will appear as the author of the messagecolor:RGB table of the name colormessage:The content of the message you want to sendtemplateId: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 internallyauthorName:Name that will appear as the author of the message. If not sent, it may appear ascolor:RGB table of the name colormessage:The content of the message you want to sendtemplateId: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 messagename:Name that will appear as the author of the messagecolor:RGB table of the name colormessage:The content of the message you want to sendtemplateId:ID of a style template for the messageradiusMeters: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 ornilfor allcommand:Command (e.g./help)helpText:Help text descriptionparamsArray:Parameters (optional)
Last updated