LonexOne

Set up door locks

Lock doors in game so only the right people can open them, like officers on duty at their own station. Add doors in game with the door manager, then choose who opens them in game or on the website.

Mechanics Updated 14 Nov 2026 5 min read
On this page

Door locks are part of the Mechanics module. You pick doors in game, group them into buildings, and choose who can open each one: Discord roles, website roles, ranks, divisions, people on duty in a department, or your Game Permissions groups.

Players walk up to a door they can open and press E to lock or unlock it.

Before you start#

  • Door locks are in beta, so they're only switched on for some communities for now. If you'd like to try them, ask us in support.
  • The Mechanics module needs to be installed.
  • Your game server needs the LonexOne FiveM resource, version 0.18.2 or newer. See Install the LonexOne FiveM resource.
  • To add and change doors, you need the Door locks permission. Owners and admins have it already. Give it to others under Roles.
  • Take any other door lock script off your server, so two scripts don't fight over the same doors.

Add doors in game#

  1. Join your server and type /doors. The door manager opens.
  2. Press Add a door, then look at the door and press E. For double doors and gates, look at the second half and press E again, then press Enter.
  3. Give it a name, like Front door, and pick or type a building, like Mission Row PD.
  4. Choose who can open it, then press Save.

The door is locked straight away for everyone on the server.

Choose who opens a door#

Each building has a list of who can open its doors. A door uses its building's list unless you give it its own.

  • On duty in a department: only people signed on in the CAD in that department. Use this for police stations, fire stations and hospitals.
  • A rank or division: everyone with that rank or in that division, on duty or not.
  • A Discord role or website role: everyone with it.
  • A Game Permissions group: everyone in the group, for the same reasons they get it in game.

Anyone with any one of the chips on the list can open the door.

You can change all of this on the website under Mechanics → Door locks: click a door or a building, click the chips on the right to add them, and press Save. Servers pick up the change within a few seconds.

Extras for each door#

  • Starts locked: how the door is when the server starts and after a lockdown is lifted.
  • Lock again after: the door locks itself this many seconds after someone opens it. Leave it empty or put 0 to keep it open until someone locks it. A door that's standing open swings shut before it locks.
  • Keypad: give the door a code of 4 to 8 numbers. Anyone who knows it can open the door from a keypad, even if they're not on the list. Five wrong codes in a minute and the keypad waits.
  • Lockpicking: anyone can try to pick the lock with a short game. Each pin moves faster than the last, and higher levels have more pins and a smaller target. If a pick fails, that player has to wait 30 seconds before trying the same door again. Turn on Send a break-in call to the CAD and officers get a call at the door.
  • How close to open it: how near a player has to stand.

Lock a building down#

Open a building and press Lock down, on the website or in the door manager. Every door in it locks and stays locked, and keypads and lockpicking stop working. Nobody can open its doors at the door until you press Lift lockdown, which puts each door back to how it starts. The one exception is people with the Door locks permission while People who set up door locks open every door is on.

Import doors from another script#

If you used ox_doorlock or cd_doorlock, you can bring your doors across.

  1. Export the script's table from your database as SQL or JSON. In HeidiSQL, right-click the table and pick Export database as SQL.
  2. On the website, go to Mechanics → Door locks and press Import doors.
  3. Paste the export or pick the file, then press Preview.
  4. Those scripts let jobs through, like police. Pick who each job is here, like LSPD on duty.
  5. Press Import.

Doors already at the same place are skipped, so importing twice won't make copies.

People who set up door locks#

By default, anyone with the Door locks permission can open every door. Turn off People who set up door locks open every door at the bottom of the page if you'd rather they follow each door's list like everyone else. With it off, they can't open a building in lockdown at the door either. They can still lock and unlock any door from the door manager, and lift a lockdown there or on the website.

If something isn't working#

  • Nothing happens when I press E: check you're on the door's list. If the list says on duty, sign on in the CAD first.
  • /doors says I can't set up doors: you need the Door locks permission on the website, and your Discord needs to be linked to your account.
  • The door won't stay locked: another door script is probably running. Take it off your server.

See also

Can't find what you need?

Open a ticket in our Discord and someone from the team will help. Found a bug, or missing a feature? Tell us on the feedback board.

Ask on Discord