Events
Last updated on
Network and local events, host events and page channels of the chat module.
opx:net:chat:say
Client → server. A chat line. Refused with chat.notLoaded when the sender has no loaded character and no STAFF_PERMISSION. Dropped if blank, or within RATE_MS of the sender's last one (then refused with chat.tooFast, once per burst); cut to MAX_LENGTH; broadcast to every player.
TriggerServerEvent('opx:net:chat:say', text)- text:
string
opx:net:chat:ready
Client → server. The input line is up; asks for command completions. Answered at most once per READY_MS.
TriggerServerEvent('opx:net:chat:ready')opx:net:chat:message
Server → client. A line to add to the log.
RegisterNetEvent('opx:net:chat:message', function(line) end)- line:
table—{ kind = 'chat', author, text }author:Player #<id>(chat.author.player), the sender's server id. Never a name.
opx:net:chat:suggestions
Server → client. Every command registered through OPX.Command.Register that this player may run.
RegisterNetEvent('opx:net:chat:suggestions', function(payload) end)- payload:
table—{ suggestions = { { name, help, params }, … } }
opx:net:runtime:commandResult
Server → client. Core's command read-back (OPX.CommandResult, used by /opx.anim.list, /opx.elevators.where and others). Chat draws it in the log.
RegisterNetEvent('opx:net:runtime:commandResult', function(line) end)- line:
tablekind:'info' | 'error'(wastypebefore)author:string— the server nametext:string
opx:on:chat:view
Client, local. The seam between the state and the view; every update to the page passes here.
AddEventHandler('opx:on:chat:view', function(payload) end)- payload:
table—{ kind, surface, … }
Host events
The client half uses:
open77:command:execute— sends a command.open77:command:result— refusals become toasts.open77:chat:open— open the box; raised by theTmapping and by the platform'sopen77_chatif loaded.open77:pauseKey— closes the box.
Page channels
The log lives on the overlay surface, the input line on the interactive surface.