RX Doorlock Configuration

RX Doorlock keeps its shared settings in config.lua. This file controls framework integration, administrative access, interaction ranges, door creation, lockpicking, alerts, and player-facing text.

Restart rx_doorlock after changing the configuration so server permissions and client behaviour stay aligned.

Framework and locale

Select the framework bridge and the language used for player-facing messages.

Config = {}

-- auto, standalone, rsg or vorp
Config.Framework = 'auto'
Config.Locale = 'en'
Framework modeUse
"auto"Detects a supported framework automatically.
"standalone"Runs without an RSG or VORP bridge.
"rsg"Forces the RSG integration.
"vorp"Forces the VORP integration.

Locale must match a key available inside Config.Text. The default configuration includes English (en) and Turkish (tr).

Administrator access

Door management and normal door access are separate permission decisions. An administrator may be allowed to create or edit doors without automatically receiving access through every locked door.

Config.AdminAce = 'rx_doorlock.admin'
Config.AllowCommandAce = true

-- true: admins can use every door
-- false: admins must pass normal door permissions
Config.AdminBypassDoorAccess = false

Config.AdminGroups = {
    god = true,
    admin = true,
    mod = true,
    superadmin = true
}

-- Optional framework character IDs
Config.AdminIdentifiers = {
    -- ['ABC12345'] = true
}

Permission sources

SettingBehaviour
AdminAceACE permission used for Doorlock administration.
AllowCommandAceAllows the configured command ACE path to grant administrative command access.
AdminGroupsFramework groups treated as Doorlock administrators.
AdminIdentifiersOptional framework character IDs with explicit administrative access.

Door access bypass

AdminBypassDoorAccess = false is the safer default. Administrators can manage the system, but still need to satisfy the door’s normal job, group, character, or item permissions when using it.

Set it to true only when every Doorlock administrator should also be able to open every registered door.

Commands

Commands can be renamed to match your server conventions.

Config.AdminCommand = 'doorlock'
Config.AdminCheckCommand = 'doorlockcheck'
Config.ToggleCommand = 'togglelock'
Config.CreateObjectCommand = 'createdoor'
SettingDefault commandPurpose
AdminCommand/doorlockOpens the Doorlock administration flow.
AdminCheckCommand/doorlockcheckChecks Doorlock administrative permission.
ToggleCommand/togglelockToggles the nearby registered door.
CreateObjectCommand/createdoorStarts custom door-object creation.

Administrative commands still pass through the configured permission rules. Renaming a command does not change who may use it.

Interaction and update limits

Distance settings control how doors are discovered, displayed, and used. Timing settings limit repeated requests and determine how often access or door state is refreshed.

Config.InteractionDistance = 2.0
Config.ScanDistance = 18.0
Config.NearbyDistance = 35.0
Config.DrawDistance = 12.0

Config.StateApplyInterval = 1000
Config.RequestCooldown = 750
Config.AccessRefreshInterval = 2000

Distances

SettingDefaultBehaviour
InteractionDistance2.0Maximum range for directly using a door.
ScanDistance18.0Range used while scanning for door entities.
NearbyDistance35.0Broader nearby-door processing range.
DrawDistance12.0Maximum distance for drawing Doorlock interaction information.

Timing

All timing values are in milliseconds.

SettingDefaultBehaviour
StateApplyInterval1000Interval used when applying registered door states.
RequestCooldown750Minimum delay between repeated interaction requests.
AccessRefreshInterval2000Interval used to refresh the player’s access information.

Lower intervals react more frequently but perform the related work more often. Keep the defaults unless testing shows a specific need to change them.

Controls

RX Doorlock uses RedM input hashes.

Config.Keys = {
    interact = 0xCEFD9220,     -- E
    select = 0xCEFD9220,       -- E
    cancel = 0x8CC9CD42,       -- X
    lockpick = 0x8AAA0AD4,     -- Left Alt
    placeConfirm = 0xC7B5340A, -- Enter
    openLeft = 0x06052D11,     -- Q
    openRight = 0xD51B784F     -- E
}
ActionDefault
Interact with a doorE
Select a door during creationE
Cancel selectionX
Begin lockpickingLeft Alt
Confirm object placementEnter
Preview left opening directionQ
Preview right opening directionE

When replacing a key, use a valid RedM input hash and test it alongside targeting, inventory, and interaction resources.

Object placement

These settings control the custom door-object editor used by /createdoor.

Config.ObjectPlacement = {
    ghostAlpha = 165,
    enableCamera = true,
    maxDistance = 100.0,
    maxCameraDistance = 60.0,
    movementSpeed = 0.1,
    gizmoOffsetZ = 0.5,
    gizmoSize = 0.57
}
SettingDefaultBehaviour
ghostAlpha165Transparency of the preview object during placement.
enableCameratrueEnables the placement camera.
maxDistance100.0Maximum permitted placement distance.
maxCameraDistance60.0Maximum distance allowed for the placement camera.
movementSpeed0.1Movement step used by the object editor.
gizmoOffsetZ0.5Vertical offset of the placement gizmo.
gizmoSize0.57Display size of the placement gizmo.

Keep ghostAlpha between 0 and 255. A partially transparent preview makes it easier to align the new object with floors, walls, and existing door frames.

Custom door animation

Custom door objects use a configurable opening and closing transition.

Config.CustomDoor = {
    animationDuration = 900
}

animationDuration is measured in milliseconds. Higher values make custom doors move more slowly; lower values make the transition faster.

Lockpicking

Configure the required inventory item, consumption rules, difficulty, and default chance of alerting law enforcement.

Config.Lockpick = {
    item = 'water',
    consumeOnUse = false,
    consumeOnFail = true,
    attempts = 4,
    pinSpeed = 1.0,
    defaultAlertChance = 65
}
SettingDefaultBehaviour
item"water"Inventory item required to begin lockpicking.
consumeOnUsefalseConsumes the item when a lockpick attempt begins.
consumeOnFailtrueConsumes the item when the attempt fails.
attempts4Number of attempts offered by the lockpick interaction.
pinSpeed1.0Speed multiplier used by the lockpick pins.
defaultAlertChance65Default percentage chance of sending a law alert.

Replace "water" with the actual lockpick item registered by your inventory. Review both consumption options together so the same item is not removed in a way you did not intend.

Law alerts

Law jobs listed here can receive nearby door-tampering alerts.

Config.Law = {
    jobs = {
        vallaw = true,
        rholaw = true,
        blklaw = true,
        stdenlaw = true,
        police = true,
        sheriff = true,
        marshal = true
    },
    alertDistance = 500.0,
    blipDuration = 60000
}
SettingDefaultBehaviour
jobsListed law jobsJob names permitted to receive the alert.
alertDistance500.0Maximum range used for nearby law alerts.
blipDuration60000Alert blip lifetime in milliseconds; the default is 60 seconds.

Job keys must match the names used by your framework. Remove jobs your server does not use and add custom law jobs using the same jobname = true format.

Interface text

Config.Text contains every player-facing status, editor instruction, result, and permission message. Config.Locale selects one of these language tables.

Both locale tables live inside the same Config.Text table:

Config.Text = {
    tr = { ... },
    en = { ... }
}

Turkish

Config.Text.tr = {
    locked = 'Kilitli',
    unlocked = 'Açık',
    use = 'Kullan',
    lockpick = 'Maymuncuk',
    denied = 'Bu kapının anahtarı sende değil.',
    tooFar = 'Kapıdan çok uzaktasın.',
    cooldown = 'Biraz bekle.',
    selectDoor = 'Silahını doğrult, kapıyı seçmek için [E]',
    selectSecond = 'İkinci kapıyı seçmek için [E]',
    cancel = 'İptal [X]',
    invalidDoor = 'Geçerli ve kayıtlı bir kapıya nişan al.',
    doorAlreadyRegistered = 'Bu kapı zaten doorlock sistemine kayıtlı.',
    invalidModel = 'Geçerli bir obje model kodu gir.',
    modelLoadFailed = 'Obje modeli yüklenemedi.',
    gizmoUnavailable = 'Obje editörü başlatılamadı.',
    gizmoTitle = 'Obje editörü',
    gizmoRotate = 'Döndürme moduna geç',
    gizmoTranslate = 'Taşıma moduna geç',
    gizmoSnapGround = 'Zemine oturt',
    gizmoFinish = 'Yerleştirmeyi bitir',
    gizmoCancel = 'İptal',
    gizmoMoveLR = 'Sola / sağa hareket',
    gizmoMoveFB = 'İleri / geri hareket',
    gizmoMoveUp = 'Yukarı hareket',
    gizmoMoveDown = 'Aşağı hareket',
    placeObject = 'Kapı objesini yerleştir',
    placeConfirm = 'Bitir',
    snapGround = 'Zemine oturt',
    placementTimeout = 'Yerleştirme süresi doldu.',
    openingDirection = 'Kapının açılma yönü',
    previewLeft = 'Solu önizle',
    previewRight = 'Sağı önizle',
    confirmDirection = 'Yönü onayla',
    cancelDirection = 'İptal',
    saved = 'Kapı kaydedildi.',
    deleted = 'Kapı silindi.',
    alert = 'Yakınlarda bir kapı zorlama ihbarı geldi.',
    pickSuccess = 'Kilit açıldı.',
    pickFailed = 'Maymuncuk başarısız oldu.',
    adminDenied = 'Doorlock yönetim iznin yok.'
}

English

Config.Text.en = {
    locked = 'Locked',
    unlocked = 'Unlocked',
    use = 'Use',
    lockpick = 'Lockpick',
    denied = 'You do not have access to this door.',
    tooFar = 'You are too far from the door.',
    cooldown = 'Wait a moment.',
    selectDoor = 'Aim and press [E] to select a door',
    selectSecond = 'Press [E] to select the second door',
    cancel = 'Cancel [X]',
    invalidDoor = 'Aim at a valid registered door.',
    doorAlreadyRegistered = 'This door is already registered in the doorlock system.',
    invalidModel = 'Enter a valid object model code.',
    modelLoadFailed = 'The object model could not be loaded.',
    gizmoUnavailable = 'The object editor could not be started.',
    gizmoTitle = 'Object editor',
    gizmoRotate = 'Switch to rotate mode',
    gizmoTranslate = 'Switch to translate mode',
    gizmoSnapGround = 'Snap to ground',
    gizmoFinish = 'Finish placement',
    gizmoCancel = 'Cancel',
    gizmoMoveLR = 'Move left / right',
    gizmoMoveFB = 'Move forward / back',
    gizmoMoveUp = 'Move up',
    gizmoMoveDown = 'Move down',
    placeObject = 'Place door object',
    placeConfirm = 'Finish',
    snapGround = 'Snap to ground',
    placementTimeout = 'Object placement timed out.',
    openingDirection = 'Door opening direction',
    previewLeft = 'Preview left',
    previewRight = 'Preview right',
    confirmDirection = 'Confirm direction',
    cancelDirection = 'Cancel',
    saved = 'Door saved.',
    deleted = 'Door deleted.',
    alert = 'A nearby door tampering report was received.',
    pickSuccess = 'Lock opened.',
    pickFailed = 'Lockpick failed.',
    adminDenied = 'You do not have doorlock admin permission.'
}

Every locale must preserve the same keys. You may change the displayed sentences freely, but removing or renaming a key can leave the related prompt without text.