Events
Last updated on
Network and local events of the admin module.
Every client → server payload is checked on the server; none changes anything except noclip turning off. Lists arrive in chunks of { rows, offset, total?, done }. Every menu row, eye row and form ends in open77:command:execute, exactly as if typed in chat.
opx:net:admin:open
Server → client. Answer to /opx.admin.
RegisterNetEvent('opx:net:admin:open', function(payload) end)- payload:
tableaccess:table— command names the ACL grants, mapped totrueaclKnown:booleaninventory:boolean
opx:net:admin:access
Server → client. Refreshed access map, same shape as open. Empty when the opener is no longer granted.
RegisterNetEvent('opx:net:admin:access', function(payload) end)- payload:
{ access, aclKnown, inventory }
opx:net:admin:roster
Server → client. The player list.
RegisterNetEvent('opx:net:admin:roster', function(chunk) end)- chunk:
table— roster rows plusdistance(metres, same bucket)
opx:net:admin:locations
Server → client. Saved locations.
RegisterNetEvent('opx:net:admin:locations', function(chunk) end)- chunk:
table— rows{ name, label, runtime }
opx:net:admin:items
Server → client. The inventory catalogue.
RegisterNetEvent('opx:net:admin:items', function(chunk) end)- chunk:
table— rows{ name, label, category, weapon?, ammo? },error?
opx:net:admin:bag
Server → client. One holder's bag.
RegisterNetEvent('opx:net:admin:bag', function(chunk) end)- chunk:
table— rows{ slot, name, count, label },target,error?
opx:net:admin:characters
Server → client. One account's characters.
RegisterNetEvent('opx:net:admin:characters', function(chunk) end)- chunk:
table— character rows,target,error?
opx:net:admin:found
Server → client. One page of the offline character search.
RegisterNetEvent('opx:net:admin:found', function(chunk) end)- chunk:
table— rows,tag,mode,more?,cursor?,seenAt?,error?
opx:net:admin:answer
Server → client. A command's answer to the operator.
RegisterNetEvent('opx:net:admin:answer', function(raw, ok, message, kind) end)- raw:
string - ok:
boolean - message:
string - kind:
'info' | 'success' | 'warning' | 'error'
opx:net:admin:travel
Server → client. Noclip and map-travel state.
RegisterNetEvent('opx:net:admin:travel', function(action, value) end)- action:
'noclip' | 'speed' | 'mapPick' | 'copy' - value:
boolean(noclip, mapPick) ·number(speed) ·string(copy: the clipboard row)
opx:net:admin:bodies
Server → client. State for the menu's and the eye's checkboxes.
RegisterNetEvent('opx:net:admin:bodies', function(state) end)- state:
{ invisible, frozen, worn, wornSelf, models }
opx:net:admin:tagsState
Server → client. Name tags on or off.
RegisterNetEvent('opx:net:admin:tagsState', function(on, persist) end)- on:
boolean - persist:
boolean
opx:net:admin:tagRows
Server → client. Who to tag. Sent only to a player the ACL grants opx.admin.self.tags: since PR #93 it is the only place the character name and citizen id reach a client (the player state bag carries nothing).
RegisterNetEvent('opx:net:admin:tagRows', function(chunk) end)- chunk:
table—{ rows, offset, done }- rows:
{ id, name, character?, citizenId?, staff? }[]—nameis the verified account name,characterthe character name
- rows:
opx:net:admin:doors
Server → client. All door states of the player's bucket.
RegisterNetEvent('opx:net:admin:doors', function(chunk) end)- chunk:
table— rows{ id, open, locked, sealed }
opx:net:admin:door
Server → client. One door changed.
RegisterNetEvent('opx:net:admin:door', function(id, state) end)- id:
string—0x+ hex - state:
table | false—{ open, locked, sealed };falsemeans reset
opx:net:admin:pvp
Server → client. Current PvP state, broadcast on change.
RegisterNetEvent('opx:net:admin:pvp', function(on) end)- on:
boolean
opx:net:admin:announce
Server → client. An announcement; each client wraps it in its own ANNOUNCE.STINGER clips.
RegisterNetEvent('opx:net:admin:announce', function(payload) end)- payload:
{ text: string, durationMs: number }
opx:net:admin:refresh
Client → server. Asks for a list. Needs the opener grant, plus the matching command for bag/characters/found.
TriggerServerEvent('opx:net:admin:refresh', topic, arg)- topic:
'roster' | 'locations' | 'access' | 'items' | 'bag' | 'characters' | 'found' - arg?:
any
opx:net:admin:noclipBody
Client → server. Noclip went off on the client, so the server stops hiding the body.
TriggerServerEvent('opx:net:admin:noclipBody', false)opx:net:admin:tagsRestore
Client → server. Turn the remembered name tags back on; the grant is checked again.
TriggerServerEvent('opx:net:admin:tagsRestore')opx:net:admin:doorsHello
Client → server. Asks for the bucket's door states again.
TriggerServerEvent('opx:net:admin:doorsHello')opx:net:admin:pvpRequest
Client → server. Asks for the current PvP state.
TriggerServerEvent('opx:net:admin:pvpRequest')opx:net:admin:targetReport
Client → server. A line about the eye's rows (including the grants it lacked) for the server journal.
TriggerServerEvent('opx:net:admin:targetReport', text)- text:
string
opx:on:admin:tags
Client, local. For a name tag view. Only resources in the same client VM receive it.
AddEventHandler('opx:on:admin:tags', function(payload) end)- payload:
tablekind = 'config': colours, distance, labelskind = 'rows':rowsof{ playerId, entity, own, name, user, citizenId, staff, offsetZ, alpha }kind = 'hide'
Listened to
opx:on:downed:changed
Client, local. downed's payload (see downed). Keeps the menu key and the name tags working while the operator is down.
AddEventHandler('opx:on:downed:changed', function(payload) end)open77:command:result
Server → client. The host dispatcher's answer to a line the menu sent; shown under the menu or as a toast.
RegisterNetEvent('open77:command:result', function(raw, accepted, message) end)- raw:
string - accepted:
boolean - message:
string