Home › Documentation › Custom · origen_doorlock
The custom/ folder lets you integrate any framework, notification system or logging logic without touching the core. All files here are escrow_ignore — they survive updates.
custom/
├── client/
│ ├── framework.lua — player identifier, job, gang
│ └── notify.lua — notifications, draw text, hide text
└── server/
├── framework.lua — player group, identifier
├── permissions.lua — admin/permission check
└── logs.lua — Discord webhook loggingFramework.GetPlayerIdentifier() → string | nilReturns the local player's unique identifier (citizenid / identifier).
Framework.GetPlayerIdentifier = function()
-- Config.Framework == 'custom': implement here
return nil
endFramework.GetPlayerJob() → stringReturns the local player's current job name.
Framework.GetPlayerJob = function()
return 'unemployed'
endFramework.GetPlayerJobGroup() → numberReturns the local player's job grade level.
Framework.GetPlayerJobGroup = function()
return 0
endFramework.GetPlayerGang() → stringReturns the local player's gang name. Returns 'none' by default.
Framework.GetPlayerGang = function()
return 'none'
endFramework.GetPlayerGangGrade() → numberReturns the local player's gang grade. Returns 0 by default.
Framework.GetPlayerGangGrade = function()
return 0
endCustom.Notify(text, type, length)Show a notification to the local player.
Custom.Notify = function(text, type, length)
-- Add your custom notification here
endSupported out of the box: qb-core (Framework.Functions.Notify) and esx (Framework.ShowNotification).
Custom.DrawText(text, key)Show an interaction hint text (e.g. [E] - Open door).
Supported via Config.Drawtext: qb-core, esx_textui, ox_lib.
Custom.DrawText = function(text, key)
-- Add your custom draw text here
endCustom.HideText()Hide the interaction hint text.
Custom.HideText = function()
-- Add your custom hide text here
endFramework.GetGroup(source) → stringReturns the player's permission group (e.g. 'admin', 'god').
Framework.GetGroup = function(source)
-- Config.Framework == 'custom': implement here
return 'user'
endFramework.GetIdentifier(source) → string | nilReturns the player's unique identifier server-side.
Framework.GetIdentifier = function(source)
return nil
endCustom.hasPermission(source) → booleanChecks whether a player has permission to use the door management commands. Validates against Config.GroupPermissions using both framework groups and FiveM Ace Permissions (IsPlayerAceAllowed).
Custom.hasPermission = function(src)
-- Default: checks Config.GroupPermissions via framework group + ace permissions
-- To override:
return false
endCustom.DiscordLog(title, message, webHook)Sends a Discord embed log to the given webhook URL. Automatically skips if the webhook is empty or is the default placeholder 'YOUR_DISCORD_WEBHOOK'.
Custom.DiscordLog = function(title, message, webHook)
-- Default implementation sends a Discord embed via PerformHttpRequest
-- To use a different logging system, replace this function:
print('[DoorLock] ' .. title .. ': ' .. message)
endThe three webhook slots are configured in Config.Logs:
| Slot | Fired when |
|---|---|
Config.Logs.CreateDoor | A new door is created via the management menu |
Config.Logs.DeleteDoor | A door is deleted via the management menu |
Config.Logs.DoorsUsage | A door is locked or unlocked by a player |