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_doorlockafter 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 mode | Use |
|---|---|
"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
| Setting | Behaviour |
|---|---|
AdminAce | ACE permission used for Doorlock administration. |
AllowCommandAce | Allows the configured command ACE path to grant administrative command access. |
AdminGroups | Framework groups treated as Doorlock administrators. |
AdminIdentifiers | Optional 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' | Setting | Default command | Purpose |
|---|---|---|
AdminCommand | /doorlock | Opens the Doorlock administration flow. |
AdminCheckCommand | /doorlockcheck | Checks Doorlock administrative permission. |
ToggleCommand | /togglelock | Toggles the nearby registered door. |
CreateObjectCommand | /createdoor | Starts 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
| Setting | Default | Behaviour |
|---|---|---|
InteractionDistance | 2.0 | Maximum range for directly using a door. |
ScanDistance | 18.0 | Range used while scanning for door entities. |
NearbyDistance | 35.0 | Broader nearby-door processing range. |
DrawDistance | 12.0 | Maximum distance for drawing Doorlock interaction information. |
Timing
All timing values are in milliseconds.
| Setting | Default | Behaviour |
|---|---|---|
StateApplyInterval | 1000 | Interval used when applying registered door states. |
RequestCooldown | 750 | Minimum delay between repeated interaction requests. |
AccessRefreshInterval | 2000 | Interval 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
} | Action | Default |
|---|---|
| Interact with a door | E |
| Select a door during creation | E |
| Cancel selection | X |
| Begin lockpicking | Left Alt |
| Confirm object placement | Enter |
| Preview left opening direction | Q |
| Preview right opening direction | E |
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
} | Setting | Default | Behaviour |
|---|---|---|
ghostAlpha | 165 | Transparency of the preview object during placement. |
enableCamera | true | Enables the placement camera. |
maxDistance | 100.0 | Maximum permitted placement distance. |
maxCameraDistance | 60.0 | Maximum distance allowed for the placement camera. |
movementSpeed | 0.1 | Movement step used by the object editor. |
gizmoOffsetZ | 0.5 | Vertical offset of the placement gizmo. |
gizmoSize | 0.57 | Display 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
} | Setting | Default | Behaviour |
|---|---|---|
item | "water" | Inventory item required to begin lockpicking. |
consumeOnUse | false | Consumes the item when a lockpick attempt begins. |
consumeOnFail | true | Consumes the item when the attempt fails. |
attempts | 4 | Number of attempts offered by the lockpick interaction. |
pinSpeed | 1.0 | Speed multiplier used by the lockpick pins. |
defaultAlertChance | 65 | Default 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
} | Setting | Default | Behaviour |
|---|---|---|
jobs | Listed law jobs | Job names permitted to receive the alert. |
alertDistance | 500.0 | Maximum range used for nearby law alerts. |
blipDuration | 60000 | Alert 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.