Configuration

Configuration

Edit script/shared/config/main.lua:

return {
  framework = "auto",
  permissionType = "ace",
  acePermission = "pf_refund.admin",
  allowedGroups = { "admin", "god", "superadmin" },
 
  commands = {
    refund = "refund",
    claimRefund = "claimrefund",
  },
 
  accentColor = "blue",
  imageUrl = "nui://ox_inventory/web/images/",
 
  limits = {
    maxItemCount = 10000,
    maxItemsPerRefund = 5000,
    maxUsesCap = 1000,
  },
 
  logging = {
    oxLib = {
      enabled = false,
    },
    discord = {
      enabled = false,
      webhook = "",
    },
  },
}

Settings

SettingDefaultDescription
framework"auto"Framework to use — "auto", "qbcore", "qbox", or "esx"
permissionType"ace"Permission system — "ace" or "framework"
acePermission"pf_refund.admin"ACE permission required to open the admin panel
allowedGroups{ "admin", "god", "superadmin" }Framework groups allowed to create refunds (when using "framework" permission type)
accentColor"blue"UI accent color (any Mantine color name or hex value)
imageUrl"nui://ox_inventory/web/images/"Path to ox_inventory item images

Commands

SettingDefaultDescription
commands.refund"refund"Admin command to open the refund creation panel
commands.claimRefund"claimrefund"Player command to redeem a code

Limits

SettingDefaultDescription
limits.maxItemCount10000Maximum quantity per item in a refund
limits.maxItemsPerRefund5000Maximum unique items per refund code
limits.maxUsesCap1000Maximum uses cap per code

Logging

Supports two logging backends that can be enabled independently:

  • ox_lib logger — Set logging.oxLib.enabled to true
  • Discord webhooks — Set logging.discord.enabled to true and provide a webhook URL

Logs track refund creation, claims, and partial claims.

Localization

Locale files are in locales/. Includes English (en.json) and Danish (da.json). Uses ox_lib's locale system — add a new JSON file to support additional languages.