Currently, doors must be configured directly inside the `ox_doorlock` resource.
It would be very useful to register new doors dynamically from other resources using an export, passing all the attributes the system already supports.
Proposal
Add an exported function, for example:
exports.ox_doorlock:RegisterDoor({
id = 'custom_bank_door_01',
coords = vec3(150.26, -1040.2, 29.37),
heading = 250.0,
model = `v_ilev_bk_door`,
state = true, -- locked/unlocked
-- Optional / advanced
auto = false,
autolock = true,
double = {
{
coords = vec3(149.9, -1040.2, 29.37),
heading = 70.0,
model = \`v_ilev_bk_door2\`,
},
{
coords = vec3(150.6, -1040.2, 29.37),
heading = 250.0,
model = \`v_ilev_bk_door2\`,
},
},
characters = { 12345, 67890 },
groups = { police = 2, fib = 0 },
items = { 'lockpick', 'bank_keycard' },
lockpick = true,
lockpickDifficulty = 0.5,
passcode = '1234',
hideUi = false,
holdOpen = false,
lockSound = 'door_lock',
unlockSound = 'door_unlock',
maxDistance = 2.5,
doorRate = 1.0,
})
Currently, doors must be configured directly inside the `ox_doorlock` resource.
It would be very useful to register new doors dynamically from other resources using an export, passing all the attributes the system already supports.
Proposal
Add an exported function, for example: