Configuration
Overview
The dnd_identitydocs resource offers extensive customization options designed to fit a variety of roleplay server scenarios. These configurations are stored in a Lua configuration file (config.lua) and allow adjustments to features such as access control, job-based permissions, emote settings, and more.
Configuration Options
General
lua
Config.Debug = false -- Enable debug mode
Config.use_holder = true -- Use DB-backed holder mode (true) or item-based mode (false)- Debug Mode: Set
truefor debugging during development. Disable for production. - Storage Mode: Choose between database-backed (
true) or item-based (false) storage.
Jobs and Access Control
lua
Config.AccessControl = {
['police'] = 2, -- Grade-based restriction
['ems'] = 0
}- Example: Only police rank 2+ can access restricted resources. EMS has unrestricted access.
Emotes
lua
Config.ShowEmote = 'wave' -- Emote used when showing identity
Config.ViewEmote = 'thumbsup' -- Emote used when viewing identity- Show/View Emotes: Customizable job emotes to enhance roleplay.
Radial Menu Integration
Ensure you have the qbx-radialmenu resource installed for document quick-access:
lua
Config.RadialMenu = true -- Enable/disable radial menuArchive and Filters
lua
Config.ArchiveFilterByJob = true -- Only show documents related to the user's job- Archive Filtering: Filters archive listings based on player job/grade.
Command Binding
lua
Config.CustomCommands = {
HolderDocuments = '/holder_documents'
}- Quick Commands: Bind custom commands for accessing document features instantly.
Encryption-Specific
lua
Config.escrow_ignore = true -- Skip CFX escrow enforced validationOptional bypass for resources using escrow encryption.
Example Configuration
An example production-grade config.lua:
lua
Config.Debug = false
Config.use_holder = true
Config.AccessControl = {
['police'] = 2,
['admin'] = 0
}
Config.ShowEmote = 'salute'
Config.ViewEmote = 'point'
Config.RadialMenu = true
Config.ArchiveFilterByJob = true
Config.CustomCommands = {
HolderDocuments = '/holder_documents',
}
Config.escrow_ignore = true