Configuration
Configuration reference and runtime behavior for gcm-reports.
This resource uses static config files plus DB-backed runtime config managed by ConfigManager.
config.lua
Config.Debug
- Type:
boolean - Current:
true - Allowed:
true/false - Impact: Enables debug logs through
Debug:new({ enabled = Config.Debug }).
Config.Language
- Type:
string - Current:
'es' - Allowed: locale keys available in
locales/*.json - Impact: Selects runtime translations used in server/client UI messages.
Config.maxActiveReports
- Type:
number - Current:
1 - Allowed: positive integer (runtime save normalizes with
math.max(1, floor(value))) - Impact: Limits concurrent active reports per user logic.
Config.anonymousStaffMessages
- Type:
boolean - Current:
true - Allowed:
true/false - Impact: Replaces staff sender names with generic localized label in report chat.
Config.notificationPosition
- Type:
string - Current:
'top-right' - Allowed:
top-left,top-center,top-right,center-left,center,center-right,bottom-left,bottom-center,bottom-right - Impact: Defines client NUI notification anchor position.
Config.Commands
Config.Commands['userpannel']
- Type:
table - Current:
{ name = 'greport', helpKey = 'commands.user_help' } - Impact: Registers user panel command label/help text.
Config.Commands['adminpannel']
- Type:
table - Current:
{ name = 'gadmin', helpKey = 'commands.admin_help' } - Impact: Registers admin panel command label/help text.
Config.reportTypes
reportTypes[]
- Type:
array<object> - Current: 3 default rows (
support_general,report_player,report_bug) - Fields:
id,labelKey,icon - Impact: Seeds DB report types when DB table is empty.
Config.teleportPoints
teleportPoints[]
- Type:
array<object> - Current: 3 default points (
mrpd,hospital_pillbox,legion_square) - Fields:
id,nameKey,coords {x,y,z} - Impact: Seeds DB teleport points when DB table is empty.
svconfig.lua
Config.discordWebhook
- Type:
string - Current: configured webhook URL
- Allowed: valid Discord webhook URL
- Impact: Required by screenshot modal flow (
gcm_reports:admin:takeScreenshotForModal).
custom/server.lua adapters
Custom.getItemList()
- Type:
function - Current: maps detected backend item lists for
qb-inventory,ps-inventory,codem-inventory,qs-inventory,origen_inventory,core_inventory, andtgiann-inventory - Allowed: return
array<object>withnameandlabel - Impact: Provides available item choices for give-items actions when the internal
ox_inventorypath is not used.
Custom.giveItem(source, item, count)
- Type:
function - Current: routes item delivery through detected inventory backend, with framework fallback for
qb-core,qbx_core, andesx - Allowed: should return truthy on success,
falseon failure - Impact: Used by the give-items quick action outside the dedicated
ox_inventorypath.
Custom.openPlayerInventory(source, target)
- Type:
function - Current: implemented for
qb-inventory,ps-inventory,origen_inventory,core_inventory,tgiann-inventory, andjpr-inventory - Allowed: should return
truewhen the backend inventory is opened,falsewhen unsupported - Impact: Controls whether the inventory quick action succeeds for non-
ox_inventorysetups.
Custom.openClothingMenu(source)
- Type:
function - Current: implemented for
esx_skin,qb-clothing,illenium-appearance,fivem-appearance,rcore_clothing, andorigen_clothing - Allowed: should return
truewhen the clothing UI is opened,falsewhen unsupported - Impact: Powers the
ropaquick action and prevents false-positive success responses.
Custom.revivePlayer(source)
- Type:
function - Current: implemented for
qb-ambulancejob,qbx_medical,wasabi_ambulance, andesx_ambulancejob, with framework fallback for QBCore/QBX/ESX - Allowed: should return
truewhen revive is dispatched,falsewhen unsupported - Impact: Powers the revive quick action and standardizes backend-specific revive paths.
Custom.getIdentifier(source)
- Type:
function - Current: resolves
citizenidforqb-core/qbx_core, ESX identifier viagetIdentifier(), then falls back to license - Allowed: should return a stable unique identifier string
- Impact: Core identity key for staff stats, groups, and report ownership mapping.
Custom.getStaffLevel(source)
- Type:
function - Current: hardcoded
'full'for one identifier andfalsefor all others - Impact: Staff authorization bootstrap before DB-based group fallback.
DB-backed runtime config (ConfigManager)
These keys are persisted in config tables and can be changed from admin panel callbacks:
max_active_reports
- Type: stored
string, read asnumber - Impact: Runtime active report limit.
anonymous_staff_messages
- Type: stored
string('true'/'false') - Impact: Runtime anonymous staff chat behavior.