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;detailnames the field (wasdoorlock.bad_<field>before PR #95). -
A new
nativeturns a double door into a single one, anddoorsthe reverse. -
The door is set to the
stateit ends up with.
Returns
- the door id
Errors
doorlock.unknownDoor,doorlock.error.bad_door(data not a table),doorlock.error.bad_field, plus those ofCreateDoor
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)