The Chat component manages command registration, message broadcasting, and service communication (911/311 dispatch).Documentation Index
Fetch the complete documentation index at: https://mythicframework.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Access viaChat (server-side only).
Commands
Register custom chat commands
Messaging
System, OOC, and broadcast messages
Emergency Services
911/311 calls and dispatch
Staff Commands
Admin and staff command registration
Command Registration
Chat:RegisterCommand
Register a custom chat command accessible to all players.Command name without the
/ prefixHandler function:
function(source, args, rawCommand)Command suggestion shown in chat:
{ help = "description", params = {} }Expected argument count. Use
-1 for variable arguments.Job requirements to use the command
Chat:RegisterAdminCommand
Register a command that requires admin permissions.RegisterCommand (without job).
Example:
Chat:RegisterStaffCommand
Register a command that requires staff permissions.Chat:Refresh:Commands
Refresh the command suggestion list for a specific player. Call this after duty changes or job updates.Player server ID
Chat:ClearAll
Clear the chat for all connected players.Message Sending
Chat.Send.Server:All
Send a server message to all players.Message text
Chat.Send.Server:Single
Send a server message to a single player.Player server ID
Message text
Chat.Send.System:All
Broadcast a system message to all players.Chat.Send.System:Single
Send a system message to a single player.Chat.Send.System:Broadcast
Broadcast a system-wide message.Chat.Send.Broadcast:All
Send a broadcast message with an author.Author/sender name
Message text
Chat.Send.OOC
Send an Out-of-Character message from a player.Emergency Services
Chat.Send.Services:Emergency
Send a 911 emergency call (visible to on-duty police and EMS).Caller’s server ID
Emergency description
Chat.Send.Services:EmergencyAnonymous
Send an anonymous 911 call.Chat.Send.Services:EmergencyRespond
Send a 911 response to a specific caller.Responder’s server ID
Original caller’s server ID
Response message
Chat.Send.Services:NonEmergency
Send a 311 non-emergency call.Chat.Send.Services:NonEmergencyAnonymous
Send an anonymous 311 call.Chat.Send.Services:NonEmergencyRespond
Send a 311 response to a caller.Chat.Send.Services:Dispatch
Send a dispatch message to a player.Chat.Send.Services:TestResult
Send a test result message to a player.Best Practices
Refresh Commands on Duty Changes
Refresh Commands on Duty Changes
Validate Command Arguments
Validate Command Arguments
Next Steps
Chat - Events
Chat events and message types
Admin Commands
Admin command reference
Jobs API
Job system for command restrictions