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.StaffFullAccess
  • Type: array<string>
  • Current: {'superadmin','admin','god'}
  • Allowed: framework groups / ACE permissions valid in your server
  • Impact: Grants full staff level (full) directly from config.
Config.StaffBasicAccess
  • Type: array<string>
  • Current: {'mod','moderator'}
  • Allowed: framework groups / ACE permissions valid in your server
  • Impact: Grants basic staff level (basic) only when the player has no panel group assignment.

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: Legacy fallback webhook for screenshot upload when config/logs.lua key screenshot-upload is not configured.

config/logs.lua

This file controls Discord logging with one webhook per log type.

enabled
  • Type: boolean
  • Current: true
  • Allowed: true / false
  • Impact: Global on/off switch for all Discord logs in server/logs.lua.

Webhook keys (webhooks)

Operational report lifecycle:

webhooks['report-created']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when a player creates a report.
webhooks['report-claimed']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when staff claims a pending report.
webhooks['report-resolved']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when staff resolves a report.
webhooks['report-released']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when a claimed report is released back to pending (for example on staff disconnect).

Staff/admin management:

webhooks['staff-duty']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when staff duty state is toggled.
webhooks['admin-config-general']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired on general runtime config updates.
webhooks['admin-config-tp-add/update/delete']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL' each
  • Impact: Fired on teleport point add/update/delete config actions.
webhooks['admin-config-type-add/update/delete']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL' each
  • Impact: Fired on report type add/update/delete config actions.
webhooks['admin-group-add/update/delete']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL' each
  • Impact: Fired on permission group management operations.
webhooks['admin-add-staff']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when staff is linked/added.
webhooks['admin-remove-staff']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when staff is removed.
webhooks['admin-update-staff']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when staff group assignment changes.

Quick actions:

webhooks['quick-bring/goto/bringback/back/teleport/inventory/giveitems/revive/ropa/bucket/espectar']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL' each
  • Impact: Fired per quick-action operation with actor/target/report context.
webhooks['quick-screenshot-request']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired when screenshot quick action is requested.
webhooks['quick-screenshot-result']
  • Type: string
  • Default: 'YOUR_WEBHOOK_URL'
  • Impact: Fired after screenshot upload result (success/failure and URL).

Screenshot upload endpoint:

webhooks['screenshot-upload']
  • Type: string
  • Default: from Config.discordWebhook when present, otherwise 'YOUR_WEBHOOK_URL'
  • Impact: Upload target used by screenshot modal capture flow.

Log translations (locales/*.json)

server/logs.lua reads translated log labels/messages from the logs section in locale files.

logs.* (root translation block)
  • Type: object
  • Current: implemented in both locales/en.json and locales/es.json
  • Impact: Localizes embed username/footer, report/player labels, event titles, and event message templates.

Noise-reduction policy currently applied

To avoid Discord spam, these logs are intentionally not emitted:

  • resource start/stop
  • command usage
  • panel open events
  • chat message logs

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: resolves config-based staff level ('full', 'basic', or false) using framework/ACE checks.
  • Impact: First pass for staff authorization before DB group override logic in admin callback resolution.
Custom.hasConfigFullAccess(source)
  • Type: function
  • Current: checks membership against Config.StaffFullAccess
  • Impact: Explicit helper used to detect full config access.
Custom.hasConfigBasicAccess(source)
  • Type: function
  • Current: checks membership against Config.StaffBasicAccess
  • Impact: Explicit helper used to detect basic config access.

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.