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
| Setting | Default | Description |
|---|---|---|
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
| Setting | Default | Description |
|---|---|---|
commands.refund | "refund" | Admin command to open the refund creation panel |
commands.claimRefund | "claimrefund" | Player command to redeem a code |
Limits
| Setting | Default | Description |
|---|---|---|
limits.maxItemCount | 10000 | Maximum quantity per item in a refund |
limits.maxItemsPerRefund | 5000 | Maximum unique items per refund code |
limits.maxUsesCap | 1000 | Maximum uses cap per code |
Logging
Supports two logging backends that can be enabled independently:
- ox_lib logger — Set
logging.oxLib.enabledtotrue - Discord webhooks — Set
logging.discord.enabledtotrueand provide awebhookURL
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.