Community Service
Configuration
Configuration
config.lua at the resource root. Unencrypted and freely editable.
Globals
Config.Framework = 'qbx' -- 'qbx' | 'qb' | 'esx'
Config.Debug = false -- enable console debug
Config.Database = {
autoInstall = true, -- auto-create tables on resource start
}
Config.Commands = {
assign = 'comserv', -- /comserv <id> <count> [reason]
end_service = 'endcoms', -- /endcoms <id> — release early
}
Config.Webhook = 'https://discord.com/api/webhooks/...' -- assign/release/complete logs
Permissions
Config.Permissions = {
useDiscordWhitelist = false, -- true = Discord roles, false = ACE groups
-- Option A — Discord role IDs
discordRoles = { '1320234519873323082' },
-- Option B — specific Discord user IDs
discordIDs = { '878077871443288086' },
-- Option C — ACE groups (used only if useDiscordWhitelist = false)
allowedGroups = { 'mod', 'admin', 'god' },
}
Config.Discord = {
botToken = 'YOUR_BOT_TOKEN',
guildId = 'YOUR_GUILD_ID',
}
Notification system
Config.NotifySystem = 'ox_lib' -- 'qbcore' | 'esx' | 'ox_lib' | 'mythic' | 'okokNotify' | 'custom'
For 'custom', edit the Notify function in client.lua.
Locations
Config.ServiceLocation = vector3(3083.0, -4722.0, 15.26)
Config.ReturnLocation = vector3(276.72, -346.45, 44.92)
Config.MaxDistance = 60.0 -- max meters from service location
Config.TaskLocations = {
vector3(3084.5, -4725.5, 15.26),
vector3(3092.0, -4722.0, 15.26),
-- add more...
}
Penalty + routing
Config.EscapePenalty = 5 -- extra tasks added if player tries to leave the area
Config.PunishmentBucket = 999 -- routing bucket ID — isolates punished players
The routing bucket prevents friends from session-hopping in to help the punished player.
Auto-strip weapons on completion
Config.RemoveWeaponsOnCompletion = true -- strip every ox_inventory weapon item on release
Mirrors qbx_adminmenu's /removeweapons logic. Keeps the punishment meaningful after release.
Skill-checks
Config.SkillCheck = {
enabled = true,
difficulty = { 'medium', 'medium' }, -- sequence: 'easy' | 'medium' | 'hard'
inputs = { 'w', 'a', 's', 'd' },
failMessage = 'Fallaste! Intenta de nuevo.',
}
Each task is gated by ox_lib skill-check. Multiple difficulty values mean multiple consecutive checks per task.
Chat announcements
Config.ChatAnnouncement = {
enabled = false,
onAssignment = true,
onCompletion = true,
onRelease = false, -- default false to avoid admin-action spam
assignmentMessage = '^3[COMMUNITY SERVICE]^7 %s has been sentenced to ^1%d^7 community service tasks. ^3Reason:^7 %s',
completionMessage = '^3[COMMUNITY SERVICE]^7 %s has completed their community service.',
releaseMessage = '^3[COMMUNITY SERVICE]^7 %s has been released from community service by an admin.',
}
UI theming
Config.UIColors = {
primary = '#dc2626', -- titles, buttons, gradients
secondary = '#991b1b', -- hover/gradient end
success = '#10b981',
warning = '#f59e0b',
danger = '#ef4444',
textPrimary = '#ffffff',
textSecondary = '#fca5a5',
textMuted = '#f87171',
cardBorder = 'rgba(220, 38, 38, 0.2)',
}
Config.TaskMarkerColor = {
r = 255, g = 0, b = 0, a = 200, -- 0-255 per channel
}
