Overview
| Detail | Value |
|---|---|
| Frameworks | VORP, RSG, auto |
| Admin Panel | /doorlocks |
| Door Creation | /addDoor, /delDoor, /doorhash |
Features
Admin NUI Panel
Admin NUI Panel
Open the full door management interface with
/doorlocks. From the panel you can create new door records, edit existing ones, set access rules, enable lockpicking, configure auto-relock timers, and delete doors — all without touching the database directly.In-World Door Creation
In-World Door Creation
Use
/addDoor while aiming at a door and fire to register it. The command captures the door’s hash and coordinates automatically. Use /doorhash to read the hash of any door you are aiming at without creating a record, and /delDoor to remove a registered door by ID.Access Rules
Access Rules
Set per-door access rules using any combination of:
- Job + grade — restrict to a specific job at or above a minimum grade
- Group — restrict to a named server group (ACE group)
- Gang — restrict to a named gang affiliation
- Character ID — restrict to a specific character record
- Key item — require players to carry a specific inventory item to interact
Lockpicking
Lockpicking
Enable lockpicking on a per-door basis. Choose your minigame provider from the supported list: bcc-minigames, sh-lockpick, SS-Lockpick, gum_lockpick, or
auto to detect whichever is running. Players without access can attempt to pick the lock using the configured minigame.Police Alerts
Police Alerts
When lockpicking is attempted or succeeds on an alerted door, sh-doorlocks notifies on-duty law enforcement roles. Configure whether the alert triggers on a successful pick or on the attempt itself. Alerts include the door’s location so officers can respond.
Double-Door Sync
Double-Door Sync
Link two door IDs together so locking or unlocking one automatically applies the same state to its paired door. Useful for saloon swing doors, barn gates, and any entrance with matching left and right panels.
Auto-Relock
Auto-Relock
Set a per-door relock timer in seconds. After the timer expires following an unlock, the door automatically locks itself again. Set to
0 to disable auto-relock on a given door.Restart State Policy
Restart State Policy
Control what happens to door states when the server restarts. Choose from three policies:
lock_all— every door locks on restart regardless of its previous statedefault_locked— doors revert to their configured default statepersist_last_state— doors restore the exact state they were in before the restart
Database Importers
Database Importers
Migrate existing door records from bcc-doorlocks, vorp_doorlocks, or rsg-doorlock using the included import scripts. Run the importer once after installation to carry over your existing door configurations.
Discord Logging
Discord Logging
Log admin panel actions, door state changes, lockpick attempts, and security violations (such as players trying to access restricted doors) to a Discord webhook. Each log entry includes the relevant player name, door ID, and timestamp.
Installation
Import the database schema
Run
sh-doorlocks/sql/install.sql against your server database to create the doors table.Set your framework
Open
config.lua and set Config.Framework to 'vorp', 'rsg', or 'auto' to match your server.Configure admin access
Set
Config.AdminAccess.ace to the ACE permission string your admins hold (shdoorlocks.admin by default), or add job entries to Config.AdminAccess.jobs if you prefer job-based admin access.Choose a lockpick provider
If you want lockpicking enabled, set
Config.Lockpick.defaultProvider to the minigame resource you are running, or leave it as 'auto' to detect automatically.Set your restart policy
Choose a
Config.RestartStatePolicy value that fits your server’s expectations. 'default_locked' is recommended for most servers.Configure logging
Set
Config.Logging.enabled to true and add your Discord webhook URL to Config.Logging.webhook to enable logging.Configuration
config.lua
Server Exports
Use these exports to manage doors from other resources running on your server.Client Exports
Use these exports from client-side scripts to read nearby door state.sh-housing uses sh-doorlocks for property door management. If you run both resources, start sh-doorlocks first in your
server.cfg so sh-housing can find the provider at initialisation.Adding Doors In-World
- /addDoor
- /doorhash
- /delDoor
Aim your crosshair at the door model you want to register, then type
/addDoor and press enter. The command fires a ray from your camera to detect the door hash and capture its world position. A confirmation message shows the new door ID once the record is saved.