OPX//77
CreatorsServer exports

EditDoor

Last updated on

Changes fields of a managed door, ox_doorlock's editDoor.

local res = exports.opx_infinity:EditDoor(ref, data)

Scope write · must be awaited — a synchronous call answers export.mustAwait before touching anything.

Parameters

  • ref: integer | string — door id or seeded key

  • data: table — only the fields to change

  • A field given replaces the door's; '' clears it.

  • A value of a different type from the stored one is refused with doorlock.error.bad_field; detail names the field (was doorlock.bad_<field> before PR #95).

  • A new native turns a double door into a single one, and doors the reverse.

  • The door is set to the state it ends up with.

Returns

  • the door id

Errors

  • doorlock.unknownDoor, doorlock.error.bad_door (data not a table), doorlock.error.bad_field, plus those of CreateDoor
Example
CreateThread(function()
  local pending = Open77.exports.call('opx_infinity', 'EditDoor', 12, { passcode = '', autolock = 30 })
  local res = pending and pending:await()
  if not (res and res.ok) then print('refused: ' .. tostring(res and res.error)) end
end)

On this page

No Headings