Step-by-step installation guide, common issues & solutions, code snippets, error codes, config previews, locales previews, SQL previews, and changelogs; all in 1 easily accessible place.
1. Unzip the
cd_doorlock.zipfolder and place this folder in your server's resource folder.
2. Add the resource to your server start config:
ensure cd_doorlock(if you are using a framework it must be placed anywhere below your framework resource eg., es_extended, not above).
3. WARNING The name of the folder must not be changed or the resource will not function correctly.
4. WARNING Do not edit the encrypted files in any way.
Why? Well long story short;- once a player has joined your server with this resource running you can no longer force change their key binds for this resource through the
config.lua, only they can change it in the in-game pause menu settings. Although it will change for the players who join after you have changed it.
The benefit of this system is that it's much more optimised and players can easily change their own key binds on keyboards or controllers. You can also check out the Default Keybinds for this resource.
door_data.jsonand other files contains all of your server's door data (basically your door database), and when current users are updating we don't want them to accidentally overwrite their saved door data.
This script is made to be as simple to use as possible; therefore all of the doors for every Gabz Map come pre-configured. You can simply choose which map you want to import the door lock files for and the script will set them up automatically for you. You can have 500+ doors fully configured with just a few clicks. Make sure you enter the jobs/identifier to set the default permissions for that location.
Import pre-configured door locks for Gabz maps.
New doors are also created in-game through the UI. To choose the door we use our own custom target system.
Choose door type.
Choose door using our target system.
Configure door settings.
All of the configurations for doors is done through the UI in-game;- not through a database, text files or configs. This can be done through the Create/Edit tab on the UI.
Edit any door's settings.
Choose from multiple door sounds or even add more.
From this tab on the UI in-game, you can easily delete door locks for individual doors or delete the whole maps (a location group) door locks with a single click. Please note that the delete option is only visible to admins. (eg., the 100+ doors for Bolingbroke prison can be deleted instantly with a single click).
Easily delete door locks.
All of these chat commands can be renamed and disabled/enabled in the config/code.
These events are completely optional, you can use them if needed. These are less important events, the more important events are documented in the other sections above.
client-side to client-side
server-side to client-side
Set the state of the closest door
The 1st argument [state] sets the doors state (false = unlock, true = lock).
The 1st argument [state] sets the doors state (false = unlock, true = lock). The 2nd and 3rd arguments are how we tell the script which door it should change.
TriggerEvent('cd_doorlock:SetDoorState_name', state, door_name, location_group)
Set the state of the closest door
The 2nd argument [state] sets the doors state (false = unlock, true = lock).
TriggerClientEvent('cd_doorlock:SetDoorState_closest', source, state)
The 2nd argument [state] sets the doors state (false = unlock, true = lock). The 3rd and 4th arguments are how we tell the script which door it should change.
TriggerClientEvent('cd_doorlock:SetDoorState_name', source, state, door_name, location_group)
These exports are completely optional, you can use them if needed.
Get the state of the closest door
Get the state of a specific door
The 1st and 2nd arguments are how we tell the script which door we want to get the state of.
🔔 Folder Name Make sure the name of the folder either
On the UI only 2 tab’s are showing not 4?eg., you are an admin but only the Control and Settings tab are visible on the UI; but it should show all 4 tabs (Create/Edit, Control, Import & Settings). So you are unable to create new doors or import doors.✔️ This is because you don’t have admin permissions set up correctly on your server. There could be multiple reasons for this.1. The Config.AdminList in the config.lua has not been configured correctly for your server.2. If you use ESX or QBCORE your players permissions are set up incorrectly through your framework. This is nothing to do with this script.3. If you are using the Standalone framework option, you have either not added your identifier to the Config.AdminList table or the identifier is wrong.
4387 - You are pressing E to interact with a door but your job/identifier does not match the job/identifier required to interact with this door.
7854 - You are pressing E to interact with a door but there are no doors nearby.
3001/3002/3003/3004 - You are pressing E to interact with a door but no doors have been created/imported yet.
Files Changed: Not every update requires you to replace the whole folder. We do this because we understand it's a pain to redo the configs for every update.
- All Files - This means you download the latest version from keymaster, copy and paste all the new files/folders into the
cd_doorlockfolder, reconfigure the configs folder and restart your server.
- Specific Files - This means you can simply copy and paste the SPECIFIC new files over the old ones and restart the server.
Update Type: On rare occasions, you are forced to update to the latest version. Mostly due to authentication updates where the old versions will no longer work.
- Mandatory - This means you MUST update to this new version or the old versions will no longer work.
- Optional - This means it's completely your choice whether you wish to update to the latest version. But we do not offer support for old versions for obvious reasons; they are old.