OPX//77
opx_infinityappearance

Events

Last updated on

Network and local events of the appearance module, and the decision events raised on the client.

opx:in:appearance:face and opx:in:appearance:clothing are private server events.

opx:net:appearance:saveFace

Client → server. Store this face. Cooldown 2 s.

TriggerServerEvent('opx:net:appearance:saveFace', { snapshot = snapshot, citizenId = citizenId })
  • payload: table
    • snapshot: table
    • citizenId?: string
    • family?: string — sent by a creation only; written once to the character

opx:net:appearance:saveClothing

Client → server. Store this clothing record. Refused with clothing.noFittingRoom unless a grant is live. Cooldown 2 s.

TriggerServerEvent('opx:net:appearance:saveClothing', { clothing = record, citizenId = citizenId })
  • payload: { clothing, citizenId }

opx:net:appearance:faceSaved

Server → client. The face was stored.

RegisterNetEvent('opx:net:appearance:faceSaved', function(snapshot) end)

opx:net:appearance:clothingSaved

Server → client. The clothing was stored.

RegisterNetEvent('opx:net:appearance:clothingSaved', function(record) end)

opx:net:appearance:refused

Server → client. A save was refused; see refusal codes.

RegisterNetEvent('opx:net:appearance:refused', function(code, operation) end)
  • code: string
  • operation: 'appearance.saveFace' | 'appearance.saveClothing'

opx:net:appearance:show

Server → client. /opx.appearance ran: toggle the panel.

RegisterNetEvent('opx:net:appearance:show', function(kind) end)

opx:net:appearance:openWardrobe

Server → client. Sent by the server OpenWardrobe: open the fitting room.

RegisterNetEvent('opx:net:appearance:openWardrobe', function() end)

opx:net:appearance:openPanel

Server → client. Opens the appearance panel. The client listens; nothing in opx_infinity sends it.

RegisterNetEvent('opx:net:appearance:openPanel', function() end)

opx:net:appearance:roomAlive

Client → server. The fitting room is still open; sent every 2 minutes while it is. The server pushes the room's open or priced grant on by a full 10 minutes, never past 30 minutes from the grant. It grants nothing the player did not already hold.

TriggerServerEvent('opx:net:appearance:roomAlive')

opx:net:appearance:present

Client → server. This player's look, for the others. Floor 2 s per player; a change inside the floor is neither sent nor acknowledged. A look identical to the last one sent (same length and hash) is acknowledged but not sent to anyone again; a look coming back after a withdrawal is sent.

TriggerServerEvent('opx:net:appearance:present', body, equipment, wardrobe, sequence)

opx:net:appearance:presentAck

Server → client. Whether the body could be read.

RegisterNetEvent('opx:net:appearance:presentAck', function(sequence, accepted) end)

opx:net:appearance:replay

Client → server. Send me everybody else's look. Floor 500 ms.

TriggerServerEvent('opx:net:appearance:replay', sequence)

opx:net:appearance:replayed

Server → client. Every held look was sent.

RegisterNetEvent('opx:net:appearance:replayed', function(sequence) end)

opx:net:appearance:look

Server → client. Another player's look, or false while their body is away.

RegisterNetEvent('opx:net:appearance:look', function(playerId, look) end)

opx:net:appearance:absent

Client → server. My body is going (reload or unload).

TriggerServerEvent('opx:net:appearance:absent')

opx:net:appearance:resend

Server → all clients. The server half started: publish and ask again.

RegisterNetEvent('opx:net:appearance:resend', function() end)

opx:on:appearance:view

Client, local. The view seam: what the panel and the room should draw. Read by client/view.lua.

AddEventHandler('opx:on:appearance:view', function(payload) end)
  • payload: { kind, … }

opx:on:appearance:decision

Client, local. Raised with TriggerEvent after every decision, so only code inside opx_infinity hears it. Branch on event.

AddEventHandler('opx:on:appearance:decision', function(decision)
  if decision.event == 'wardrobeClosed' and decision.kept then print(#decision.slots) end
end)
  • decision: { ok, event, error?, citizenId?, … }
eventExtra fieldsRaised when
gameplayReadyThe join announcement went out.
restoredA stored face was applied (ok), or the apply failed (error).
settledok = false, error = 'stored_build_mismatch': the stored face is from another game build; the player enters on the default face.
needsCreationfamilyThe character has no face. Nothing opens the creator until a caller calls OpenCreator.
appliedA face from SetSkin or Wear it reached the puppet, or did not.
createdThe creation's face was stored, or not (error).
savedunchanged?An edit was stored, or refused (error). unchanged = true when it matched the stored face.
characterChangedThe live character changed.
panelOpened / panelClosedreason on closeThe panel went up or down.
wardrobeWantedok = true: the join owes a fitting room. ok = false: no longer owed (error says why).
wardrobeOpenedcreationThe room opened, or failed to (ok = false, error).
wardrobeClosedreason, kept, creation, slotsThe room closed. slots lists the slots changed when kept, for billing.
wardrobeGroupowner, groupA button from OfferWardrobeGroups was pressed.
clothingRestoredStored clothing read back on the puppet, or not (clothing_not_restored, clothing_gate_shut).
clothingSavedA clothing save was stored, or refused (error is the server code).

On this page