Agency Docs
Standalone

Agency-Reports V2 Configuración

Moderno sistema de reportes y soporte con interfaz en el juego para jugadores y administradores, con chat en directo.

v2.5.0Gratis5 Páginas

01Configuración

Instalación rápida · config.lua · Agency-Reports V2

Descargar config.lua

--[[ ╔══════════════════════════════════════════════════════════════════════╗ ║ AGENCY REPORTS V2 - CONFIGURATION ║ ║ (c) Agency Scripts ║ ╚══════════════════════════════════════════════════════════════════════╝ CONTENTS 1. Agency Companion The free app for your players, accent colour 2. Core Language, framework, commands 3. Permissions Who can open the admin dashboard 4. Reports Report categories 5. Notifications Agency-Notify, duration, sound 6. Discord Webhook and invite button 7. Logging Console output Players type /areport, your team opens the dashboard with /areports. Tables are created by themselves on the first start (oxmysql). No version number in this file, on purpose: your config is kept across updates. The version you run is the one in fxmanifest.lua. Ad-free and re-brandable: Agency-Essentials (Reports + Notify + Progressbar + Elevator + Doorlock in one resource) https://agency-script.tebex.io/package/essentials Discord: https://discord.gg/RTax3aBMUs · Shop: https://shop.agencyg.de ]] Config = {} --============================================================================== -- 1 · AGENCY COMPANION --============================================================================== -- Agency-Companion (free): https://shop.agencyg.de/en/product/agency-companion -- One resource for every Agency script: your players type /app and link all -- Agency scripts of your server with ONE code in the free Agency Companion app -- (iPhone, Android, web). Players follow their reports and answer from the -- phone, your team claims, answers and closes reports on the go. Your admins -- also pick one accent colour for all Agency scripts in game (/app, admin page). -- Drop it into your resources, done. Admin rights are checked again on the -- server for every action, a link can never grant them. Config.Companion = { Enabled = true, -- connect with Agency-Companion (app + accent colour) Remote = true, -- false = no actions from the app (read nothing, change nothing) RelayUrl = 'https://api.agencyg.de', -- Agency relay, do not change TokenTTL = 300, -- seconds a link code stays valid } -- ── Accent colour ──────────────────────────────────────────────────────────── -- false = the colour from Agency-Companion, gold without it -- { r,g,b } = a fixed colour for this script only, e.g. { 0, 190, 255 } -- Players can still pick their own colour in the report window (Settings). Config.AccentColor = false --============================================================================== -- 2 · CORE --============================================================================== -- ── Language ───────────────────────────────────────────────────────────────── -- en bg cs da de el es fi fr hr hu it ja ko nb nl pl pt ro ru sk sv tr uk zh -- English is the fallback for any missing text. Config.Locale = 'en' -- ── Framework ──────────────────────────────────────────────────────────────── -- 'auto' (recommended) detects ESX or QBCore, 'standalone' without framework. -- 'esx' | 'qb' to force one. Config.Framework = 'auto' -- ── Commands ───────────────────────────────────────────────────────────────── Config.Commands = { Report = 'areport', -- players: open the report window (without /) AdminUI = 'areports', -- team: open the admin dashboard (without /) } --============================================================================== -- 3 · PERMISSIONS --============================================================================== -- ESX: the player's group must be listed here. -- QBCore: 'admin' or 'god' permission. Standalone: ace 'command'. Config.AdminGroups = { ['admin'] = true, ['superadmin'] = true, ['mod'] = true, ['god'] = true, } --============================================================================== -- 4 · REPORTS --============================================================================== -- ── Categories ─────────────────────────────────────────────────────────────── -- value = stored in the database, label = shown in the window Config.Categories = { { value = 'vdm', label = 'VDM' }, { value = 'rdm', label = 'RDM' }, { value = 'failrp', label = 'FailRP' }, { value = 'support', label = 'General Support' }, { value = 'bug', label = 'Bug Report' }, { value = 'other', label = 'Other' }, } --============================================================================== -- 5 · NOTIFICATIONS --============================================================================== -- Agency-Notify (free): https://agency-script.tebex.io/package/6937769 -- UseAgencyNotify = true -> Agency-Notify (or Agency-Essentials) when it runs, -- the QBCore / ESX notification otherwise -- UseAgencyNotify = false -> always the QBCore / ESX notification Config.Notifications = { Duration = 8000, -- milliseconds Type = 'info', -- info, success, error, warning UseAgencyNotify = true, PlaySound = true, -- short sound with every notification } --============================================================================== -- 6 · DISCORD --============================================================================== -- ── Webhook ────────────────────────────────────────────────────────────────── -- Posts new, claimed, closed and deleted reports into a channel. Config.Discord = { Enabled = false, BotToken = '', -- optional: bot token to show real Discord avatars Webhook = { Url = '', MentionRoleId = '', -- optional: role id to ping (without <@& >) Username = 'Agency Reports', AvatarUrl = '', }, -- ── Invite button ──────────────────────────────────────────────────────── -- Shows a Discord button in the report window that copies your invite. Invite = { Enabled = true, Link = 'https://discord.gg/Qddmx3CnMS', }, } --============================================================================== -- 7 · LOGGING --============================================================================== Config.Logging = { LogCommands = true, -- print command use to the server console }

02Archivo SQL

Importa este archivo SQL en tu base de datos antes de iniciar el recurso:

CREATE TABLE IF NOT EXISTS `agency_reports` ( `id` int(11) NOT NULL AUTO_INCREMENT, `identifier` varchar(50) NOT NULL, `player_name` varchar(50) NOT NULL, `title` varchar(50) NOT NULL, `category` varchar(50) NOT NULL, `description` text NOT NULL, `status` varchar(20) NOT NULL DEFAULT 'open', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `admin_identifier` varchar(50) DEFAULT NULL, `admin_name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `agency_report_messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `report_id` int(11) NOT NULL, `sender_identifier` varchar(100) NOT NULL, `sender_name` varchar(100) NOT NULL, `sender_role` varchar(20) NOT NULL, `message` text NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_report_id` (`report_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

¿Sigues atascado después de esta página? Nuestro soporte se encarga.