GCMod

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, and tgiann-inventory
  • Allowed: return array<object> with name and label
  • Impact: Provides available item choices for give-items actions when the internal ox_inventory path 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, and esx
  • Allowed: should return truthy on success, false on failure
  • Impact: Used by the give-items quick action outside the dedicated ox_inventory path.
Custom.openPlayerInventory(source, target)
  • Type: function
  • Current: implemented for qb-inventory, ps-inventory, origen_inventory, core_inventory, tgiann-inventory, and jpr-inventory
  • Allowed: should return true when the backend inventory is opened, false when unsupported
  • Impact: Controls whether the inventory quick action succeeds for non-ox_inventory setups.
Custom.openClothingMenu(source)
  • Type: function
  • Current: implemented for esx_skin, qb-clothing, illenium-appearance, fivem-appearance, rcore_clothing, and origen_clothing
  • Allowed: should return true when the clothing UI is opened, false when unsupported
  • Impact: Powers the ropa quick action and prevents false-positive success responses.
Custom.revivePlayer(source)
  • Type: function
  • Current: implemented for qb-ambulancejob, qbx_medical, wasabi_ambulance, and esx_ambulancejob, with framework fallback for QBCore/QBX/ESX
  • Allowed: should return true when revive is dispatched, false when unsupported
  • Impact: Powers the revive quick action and standardizes backend-specific revive paths.
Custom.getIdentifier(source)
  • Type: function
  • Current: resolves citizenid for qb-core / qbx_core, ESX identifier via getIdentifier(), 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 and false for 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 as number
  • Impact: Runtime active report limit.
anonymous_staff_messages
  • Type: stored string ('true'/'false')
  • Impact: Runtime anonymous staff chat behavior.