OPX//77
opx_infinityshops

Events

Last updated on

Network and local events of the shops module.

opx:net:shops:open

Client → server. Open the fitting room at this shop.

TriggerServerEvent('opx:net:shops:open', shopKey)
  • shopKey: string

opx:net:shops:wear

Client → server. Buy and put on a ready-made look.

TriggerServerEvent('opx:net:shops:wear', { shop = shopKey, look = lookKey })

opx:net:shops:save

Client → server. Save the current clothing as an outfit.

TriggerServerEvent('opx:net:shops:save', { name = name })

opx:net:shops:list

Client → server. Send my saved outfits.

TriggerServerEvent('opx:net:shops:list')

opx:net:shops:load

Client → server. Put on a saved outfit.

TriggerServerEvent('opx:net:shops:load', { id = outfitId })

opx:net:shops:delete

Client → server. Delete a saved outfit.

TriggerServerEvent('opx:net:shops:delete', { id = outfitId })

opx:net:shops:share

Client → server. Get (or mint) the outfit's share code.

TriggerServerEvent('opx:net:shops:share', { id = outfitId })

opx:net:shops:redeem

Client → server. Put on the outfit behind a code, inside the open fitting room of the shop named. Refused shops.redeemAtShop away from that shop's counter, shops.redeemInRoom without its room open. The outfit is put on the room's draft and billed at the shop's prices on Save.

TriggerServerEvent('opx:net:shops:redeem', { code = code, shop = shopKey })

opx:net:shops:looks

Server → client. Looks this player may take here.

RegisterNetEvent('opx:net:shops:looks', function(data) end)
  • data: table — { shop, looks = { { id, label, cost } }, prices, currency }
    • prices: { [slot] = price } — the shop's slot prices, for the room's On Save line (display only; empty when billing is off)

opx:net:shops:putOn

Server → client. Dress in this (checked). Nothing is paid yet: a look's COST and a share code's pieces are billed when the room is saved.

RegisterNetEvent('opx:net:shops:putOn', function(data) end)
  • data: table — { look, wear }

opx:net:shops:saved

Server → client. The saved outfit list.

RegisterNetEvent('opx:net:shops:saved', function(data) end)
  • data: table — { outfits = { { id, name, code? } }, max }

opx:net:shops:code

Server → client. A share code.

RegisterNetEvent('opx:net:shops:code', function(data) end)
  • data: table — { id, code }

opx:on:shops:state

Client, local. The outfit list arrived, or a code was minted.

AddEventHandler('opx:on:shops:state', function(state) end)
  • state: table — { saved } or { code, id }

On this page