This guide explains how to correctly install and configure C7 Simple Doorlock on your FiveM server. Follow each step carefully to ensure the framework loads and functions as intended.
01. Installing the Resource
1
Download the latest release of the C7 Simple Doorlock;
This folder should contain the folder: c7-scripts-doorlock
Altering the script to your preferred configuration has been made easy with our configuration file. To get started, you need to open the file: c7-scripts-doorlock/shared/config.lua
1
Configuring the Basics
To change the basics of the script, you need to change the following configuration lines:
2
Configuring Discord Integration
You must change the following lines:
3
Configuring Doorlock Admin Access
You must change the following lines:
4
Configuring Discord Webhoks
You must change the following lines:
5
Configuring Doorlock Defaults
You must change the following lines:
6
Configuring Doorlock Sounds
You must change the following lines:
You can add your own custom sounds into /nui/sounds/
Config.Command = 'doorlock'
Config.SelectDistance = 6.0
Config.InteractDistance = 2.2
Config.AutoDetectDoubleDoorRadius = 2.5
Config.StatusDrawDistance = 12.0
Config.ShowDoorlockText = true -- Toggle 3D status text under the sprite ("Locked"/"Unlocked")
Config.enableDiscord = false -- If set to 'false', discord permissions will not be used.
Config.discordBotToken = "YOUR_BOT_TOKEN" -- Replace with your Bot Token
Config.discordAppId = "YOUR_APP_ID" -- Replace with your Bot's Client ID
Config.discordGuildId = "YOUR_GUILD_ID" -- Replace with your Guild/Server ID
Config.DoorlockAccess = {
enabled = true, -- If false, anyone can access /doorlock and manage doors.
licenses = {}, -- FiveM license identifiers, e.g. { "license:1234abcd..." }
discordIds = {}, -- Discord user IDs (WITHOUT the "discord:" prefix), e.g. { "123456789012345678" }
acePerms = {}, -- Ace permissions, e.g. { "c7.doorlock" }
-- C7 Framework V3 checks (only applies if the framework resource is started)
c7fw = {
departments = {}, -- Departments to allow, e.g. { "LSPD", "BCSO" }
characterIds = {}, -- Character IDs to allow, e.g. { "RX-153471" }
}
}
Config.SoundSettings = {
enabled = true,
door_sound_volume = 0.35,
keypad_sound_volume = 0.35,
-- Door Sounds
--
-- type = 'lock' -> This will only appear in the "Lock Sound" dropdown.
-- type = 'unlock' -> This will only appear in the "Unlock Sound" dropdown.
-- file = 'name' -> The file name that appears in /nui/sounds/[name].ogg (You do not need to inclde the .ogg)
doorSounds = {
lock1 = { type = 'lock', file = 'lock1', name = 'Lock Sound #1' },
unlock1 = { type = 'unlock', file = 'unlock1', name = 'Unlock Sound #1' },
},
-- Keypad Sounds
keypadSounds = {
keypad_click = { type = 'keypad', file = 'keypad_click' }, -- When you press a digit on the keypad (1, 2, 3, 4, 5, 6, 7, 8, 9, 0).
keypad_enter = { type = 'keypad', file = 'keypad' }, -- When you press the 'enter' key on the keypad.
keypad_cancel = { type = 'keypad', file = 'keypad' }, -- When you press the 'cancel' key on the keypad.
keypad_delete = { type = 'keypad', file = 'keypad_click' }, -- When you press the 'delete' key on the keypad.
keypad_success = { type = 'keypad', file = 'keypad_success' }, -- When the code is correct and the door unlocks.
keypad_error = { type = 'keypad', file = 'keypad_error' }, -- When the code is incorrect.
}
}