Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Enhancement: Allow registering doors from other resources #12

@137ElPro

Description

@137ElPro

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,
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions