Agency Docs
Standalone

Agency-Admin الإعدادات

لوحة إدارة لـ FiveM بتصميم Agency مع لوحة ويب كاملة على حاسوبك.

v1.13.0مدفوع7 صفحات

01الإعدادات

تثبيت سريع · config.lua · Agency-Admin

تنزيل config.lua

--[[ ╔══════════════════════════════════════════════════════════════════════╗ ║ AGENCY ADMIN - CONFIGURATION ║ ║ (c) Agency Scripts ║ ╚══════════════════════════════════════════════════════════════════════╝ CONTENTS 1. Agency Companion App + web panel for your staff, accent colour 2. Core Language, framework 3. Branding Your server name and logo in the panel 4. Integrations Agency-Notify, announcements 5. Commands & Keys Commands, keybinds, hotkeys 6. Permissions Ranks and rights (managed in game) 7. Admin Tools Noclip, admin duty, object spawner 8. Dashboard & Map Server metrics, player avatars, map, dispatch 9. Pictures Catalogue pictures (vehicles, peds, objects, weapons) 10. World Weather types 11. Logs Discord webhook for admin actions 12. Reports Built-in report system 13. File Manager Files and configs in the web panel Open the panel with /aadmin (F10), the admin tools with /aa (F9). Ranks, permissions and duty outfits are set in game: Settings > Ranks & Permissions. No version number in this file, on purpose: your config is kept across updates. The version you run is the one in fxmanifest.lua. Discord: https://discord.gg/RTax3aBMUs · Shop: https://shop.agencyg.de ]] Config = {} --============================================================================== -- 1 · AGENCY COMPANION --============================================================================== -- Agency Companion app (free): -- iPhone, iPad and Mac: https://apps.apple.com/app/id6778632140 -- Android: https://play.google.com/store/apps/details?id=de.agencyg.companion -- Web app (browser): https://companion.agencyg.de/app -- Agency-Companion script (free resource, one /app code for every Agency script): https://shop.agencyg.de/en/product/agency-companion -- One resource for every Agency script: your players link them with the free -- Agency Companion app (iPhone, Android, web) and your admins pick one accent -- colour for all Agency scripts in game (/app, admin page). With it running, -- Agency Admin follows that colour and its announcement banner is used for the -- Agency Companion chat announcement. -- -- Agency Admin itself links to the app as well: your staff get the panel on -- the phone and the full web panel in the PC browser -- (companion.agencyg.de/app/admin). ADMIN-ONLY: a code is only made for a -- player who has panel access, and every command re-checks the admin's rank -- and permissions live on the server. Writes need the admin to be in game. Config.Companion = { Enabled = true, -- connect with the Agency Companion app (pairing + relay) EnableRemote = true, -- allow paired devices to reach the panel via the relay RelayUrl = 'https://api.agencyg.de', -- the Agency relay, do not change -- This server's own connection to the relay. A separate host name on purpose: -- FiveM allows only 8 connections per host, and every Agency script polls -- api.agencyg.de. Falls back to RelayUrl on its own if unreachable. ServerRelayUrl = 'https://admin-relay.agencyg.de', TokenTTL = 300, -- seconds a QR / 6-digit code stays valid -- ── Web panel ── -- The full admin panel in your PC browser, inside Agency Companion -- (companion.agencyg.de/app/admin). Connect it with the 6-digit code from the -- in-game panel (Web Panel tab or Settings > Companion). It runs through the -- Agency relay like the app: no port, nothing hosted on this server. WebPanel = true, WebPanelCommand = 'webpanel', -- opens the web panel in the browser, signed in ('' = no command) -- ── Live view ── -- Live view of a player's screen in the web panel (permission spectate_player). -- 'stream': real video. The player's game is rendered in the NUI (no -- screenshot-basic needed) and sent straight to the admin's browser over -- WebRTC. If that cannot connect, the panel switches to single frames itself. -- 'frames': single frames only. Nothing is captured while nobody watches. LiveView = { Enabled = true, Mode = 'stream', -- 'stream' | 'frames' StreamWidth = 1280, -- video width in px (640-1920), height follows the screen StreamFps = 30, -- 5-60 StreamBitrateKbps = 2500, -- 300-8000, upload the watched player needs Fps = 3, -- frames mode: 1-5 frames per second Width = 960, -- frames mode: frame width in px (320-1280) Quality = 0.55, -- frames mode: 0.2-0.9, WebP quality NotifyPlayer = false, -- tell the player when an admin starts watching NotifyText = 'An admin is watching your screen.', }, -- ── Lumo Team (new in 1.11) ── -- Lumo Team (team.lumobot.net) is the team panel of the Discord bot Lumo. -- The same 6-digit code connects this server to a team there: open your -- team > FiveM and enter it. Your team then gets the full web panel, a -- message when the server goes down or comes back, new reports, slash -- commands in Discord and Lumo AI, each member with their own Lumo rights -- on top of the in-game rights of the admin who made the code. Lumo = { Enabled = true, Command = 'lumo', -- in game: shows the code for Lumo Team in the chat ('' = no command) ConsoleCommand = 'agencyadmin_lumo', -- server console / txAdmin: agencyadmin_lumo <identifier> prints a code for that admin MaxTeams = 5, -- Lumo teams per admin; they never take the place of a phone (3 per admin) Reports = true, -- Lumo may read new reports for team messages (needs view_reports) }, } -- ── 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 } -- Every admin can still pick their own colour in the panel (Settings). -- "Agency" there is the Agency-Companion colour; when admins change it in /app, -- everybody's panel follows the new colour once. 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 -- (older codes such as 'esm' still work) Config.Locale = 'en' -- ── Framework ──────────────────────────────────────────────────────────────── -- 'auto' (recommended) | 'qb' | 'esx' | 'ox' | 'standalone' Config.Framework = 'auto' --============================================================================== -- 3 · BRANDING --============================================================================== -- Your server in the top left corner of the panel. -- ServerName the gold line above "Admin". '' hides it. -- Logo a picture inside the web folder, or a full https:// link. -- Default is the gold Agency logo. Easiest: replace -- web/images/brand/logo.png with your own square picture (PNG, -- JPG or WEBP, 256x256 or larger) and keep this setting as it -- is. false shows no logo. Config.Branding = { ServerName = 'Agency Scripts', Logo = 'images/brand/logo.png' } --============================================================================== -- 4 · INTEGRATIONS --============================================================================== -- ── Notifications ──────────────────────────────────────────────────────────── -- Agency-Notify (free): https://agency-script.tebex.io/package/6937769 -- UseAgencyNotify = true: Agency-Notify when it runs (also inside -- Agency-Essentials), otherwise the QBCore / ESX notification, otherwise the -- GTA one. Nothing to set up. Config.Notifications = { Duration = 8000, Type = 'info', UseAgencyNotify = true, PlaySound = true } -- ── Announcements ──────────────────────────────────────────────────────────── -- Announcements from the panel (Server > Announcement), from the app and the -- chat announcement of Agency-Companion (/app, admin page) all use this. -- Banner the Agency Admin banner at the top of the screen -- Chat also post them into the chat (needs the chat resource) -- Duration how long the banner stays, in ms Config.Announcements = { Banner = true, Chat = false, Duration = 7000, } --============================================================================== -- 5 · COMMANDS & KEYS --============================================================================== Config.Commands = { Primary = 'aadmin', -- opens the panel Short = 'agencyadmin', -- second name for the same Tools = 'aa' -- opens the admin tools } Config.Keybind = 'F10' -- panel, every admin can rebind it Config.ToolsKeybind = 'F9' -- admin tools -- ── Hotkeys ────────────────────────────────────────────────────────────────── -- Extra admin actions that appear under -- FiveM > Settings > Key Bindings > FiveM. -- -- They ship UNBOUND on purpose: every admin picks their own keys in the -- game settings. Put a key name here (e.g. 'F7', 'DELETE', 'NUMPAD1') to -- ship a default binding instead. -- -- Every hotkey is permission-checked on the server, so binding a key gives -- a player without the matching permission nothing at all. Config.Hotkeys = { Enabled = true, -- false = register no hotkeys at all Keys = { duty = '', -- admin_duty noclip = '', -- tool_noclip godmode = '', -- tool_godmode invisible = '', -- tool_invisible playerIds = '', -- tool_player_ids playerBlips = '', -- tool_player_ids infiniteAmmo = '', -- tool_infinite_ammo superJump = '', -- tool_super_jump healSelf = '', -- tool_heal_self reviveSelf = '' -- tool_revive_self } } --============================================================================== -- 6 · PERMISSIONS --============================================================================== -- Permissions, ranks and staff groups are managed 100% in game via -- Settings > Ranks & Permissions. Data is stored in ranks_data.json -- (auto-migrated on first boot). Nothing to set here. --============================================================================== -- 7 · ADMIN TOOLS --============================================================================== -- ── Noclip ─────────────────────────────────────────────────────────────────── -- Speed is adjusted in-game with the mouse wheel while noclip is active: -- scroll up = faster, scroll down = slower. Holding SHIFT still boosts. Config.Noclip = { BaseSpeed = 0.5, -- speed noclip starts at (units per frame) MinSpeed = 0.05, -- lower limit for the mouse wheel MaxSpeed = 10.0, -- upper limit for the mouse wheel SpeedStep = 1.15, -- factor per wheel notch (1.15 = ~15% per notch) SprintMultiplier = 4.0, -- extra multiplier while SHIFT is held RememberSpeed = true, -- keep the chosen speed for the next noclip session ShowSpeedHud = true -- briefly show the speed on screen when it changes } -- ── Admin duty ─────────────────────────────────────────────────────────────── -- Ranks, clothing and permissions are managed 100% in game via -- Settings > Ranks & Permissions. Data is stored in ranks_data.json. Config.AdminDuty = { Command = 'aaduty', Model = 'mp_m_freemode_01', NameTag = { Enabled = true, -- Enable/disable nametags globally OffsetZ = 1.15 -- Height above head (applies to all ranks) }, -- Ranks, clothing and permissions are managed 100% in-game -- via Settings > Ranks & Permissions. Data is stored in ranks_data.json. } -- ── Object spawner ─────────────────────────────────────────────────────────── -- Render distance = how far away a placed prop keeps being drawn. GTA's own -- default for script objects is short, so a big build fades out as soon as an -- admin flies off. Higher values look better but cost GPU on large scenes. -- Admins change it live with the slider in Tools > Objects; this is the value -- they start with and the range the slider offers. Config.ObjectSpawner = { RenderDistance = { Default = 300, -- metres, applied to every newly placed object Min = 50, Max = 1500, Step = 50 -- slider increment } } --============================================================================== -- 8 · DASHBOARD & MAP --============================================================================== -- ── Server metrics ─────────────────────────────────────────────────────────── -- Feeds the System Performance panel on the dashboard. -- FiveM has no native for CPU or memory, and its Lua cannot read /proc. -- The server does publish its own metrics on its game port, which is what -- txAdmin reads too. Port 0 means auto-detect (the panel probes the usual -- ports on boot and remembers the one that answers). Set it explicitly -- only if your server listens somewhere unusual. Config.Metrics = { Port = 0, -- 0 = auto-detect, or the port from endpoint_add_tcp TickBudgetMs = 5.0 -- main-thread budget; the load bar is filled against this } -- ── Player avatars ─────────────────────────────────────────────────────────── -- Players who linked their Cfx.re (FiveM) account and uploaded a profile -- picture on forum.cfx.re show that picture in the player list, the player -- info and the search. Everyone else keeps the initials avatar. The server -- asks policy-live.fivem.net once per player and keeps the answer for hours. Config.PlayerAvatars = { CfxForum = true, -- false = initials only, the server makes no requests Size = 144 -- 96 | 144 | 288 pixels } -- ── Map ────────────────────────────────────────────────────────────────────── -- The Map page: every player on the GTA map (job colour, vehicle, heading) -- and the open dispatch calls. Admins who may see the Players page see it. -- Right click on the map: set a waypoint or teleport there (needs Goto Player). -- Dispatch calls of ps-dispatch, cd_dispatch and qs-dispatch show up by -- themselves (tk_dispatch takes these events too). Any other script adds one: -- exports['Agency-Admin']:AddMapDispatch({ title = 'Shots fired', code = '10-71', -- coords = vector3(x, y, z), street = 'Vinewood Blvd', job = 'police', priority = 1 }) Config.Map = { Enabled = true, RefreshMs = 2000, -- how often the open map updates (min. 1000) ListenDispatchEvents = true, -- pick up ps-dispatch / cd_dispatch / qs-dispatch calls DispatchLifetime = 900, -- seconds a call stays on the map MaxDispatches = 60, DispatchPerMinute = 12, -- calls one player may send per minute (spam guard) MaxAnnotations = 200, -- notes + drawings admins put on the map (shared, kept in map_annotations.json) JobColors = { -- marker colour per job name, others are white police = '#3b82f6', sheriff = '#2563eb', ambulance = '#ef4444', doctor = '#f87171', mechanic = '#f97316', taxi = '#facc15', cardealer = '#a855f7', realestate= '#22c55e', } } --============================================================================== -- 9 · PICTURES --============================================================================== -- Pictures for the vehicles, peds, objects and weapons of the config. Each -- entry is photographed in game once and stored inside this resource -- (web/images/<kind>), so the panel shows it from then on. Added your own -- vehicles, peds, props or weapons? Take their pictures in Settings > Pictures -- (super admins only) or with the commands below. Needs screenshot-basic. -- /aavehicleimages entries that have no picture yet -- /aavehicleimages all every entry again -- /aavehicleimages adder a single entry (same for the other commands) -- Restart Agency-Admin afterwards so every player receives the new pictures. Config.Pictures = { Enabled = true, Commands = { vehicles = 'aavehicleimages', peds = 'aapedimages', objects = 'aaobjectimages', weapons = 'aaweaponimages' }, Width = 400, -- saved picture size in px; keep 16:9 like the cards Height = 225, Quality = 0.82 -- WebP quality, 0.3 - 1.0 } --============================================================================== -- 10 · WORLD --============================================================================== Config.WeatherTypes = { 'EXTRASUNNY', 'CLEAR', 'CLOUDS', 'OVERCAST', 'RAIN', 'THUNDER', 'CLEARING', 'SMOG', 'FOGGY', 'XMAS', 'SNOWLIGHT', 'BLIZZARD', 'SNOW' } -- Automatic day/night cycle. The weather is not touched. -- Only runs while no other weather script is started (see OtherScripts) and the -- time is not frozen in the admin menu. Setting a time in the menu continues from -- that time. Set Enabled = false if you never want Agency Admin to move the clock. Config.AutoWorld = { Enabled = true, MsPerGameMinute = 2000, -- GTA default: 2000 ms = 1 in-game minute (a full day takes 48 minutes) OtherScripts = { -- if one of these runs, Agency Admin leaves the clock alone 'qb-weathersync', 'Renewed-Weathersync', 'cd_easytime', 'vSync', 'vsync', 'weathersync', 'esx_weathersync', 'esx_weather', 'esx-weather', 'cd_weather', 'nx_weather', 'av_weather', 'wasabi_weather' } } --============================================================================== -- 11 · LOGS --============================================================================== -- Sends every admin action to a Discord channel via webhook. Config.DiscordWebhook = { Enabled = false, Url = '', -- https://discord.com/api/webhooks/xxx/yyy Username = 'Agency Admin', AvatarUrl = 'https://i.imgur.com/DrIn7M6.png', -- optional avatar URL — must be a direct image URL (content-type image/*), not an album/page link EmbedColor = 3447003, -- decimal color (3447003 = blue) Title = '', -- embed title; leave empty to use localized default from locales/*.lua (webhook_title) IncludeIdentifiers = true -- include steam/license/discord identifiers } --============================================================================== -- 12 · REPORTS --============================================================================== -- The built-in report system: /areport for players, the Reports page for staff. Config.Reports = { Enabled = true, -- master switch for the whole report system (player UI + admin UI) MessageMaxLength = 500, -- max characters per chat message ShowClosedDays = 30, -- reserved: future auto-hide of old closed reports Commands = { Submit = 'areport', -- player command: open the own-reports UI AdminUI = 'areports' -- admin command: open Agency-Admin panel directly on the Reports tab }, -- Categories shown in the player submit form (value goes into DB, label is shown). 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' } }, -- In-game notification behaviour for both players and admins. Notifications = { Duration = 8000, Type = 'info', UseAgencyNotify = true, -- fall back to Agency:Notify:Send event when framework notify unavailable PlaySound = true }, -- Per-report Discord webhook (new report, claim, close, delete). Optional -- and separate from Config.DiscordWebhook (which logs admin-panel actions). Discord = { Enabled = false, Webhook = { Url = '', MentionRoleId = '', -- Discord role ID to ping, leave empty to disable Username = 'Agency Reports', AvatarUrl = '' }, Invite = { Enabled = false, -- show a "copy invite" button in the player UI Link = 'https://discord.gg/EECYq3XUsV' } }, } --============================================================================== -- 13 · FILE MANAGER --============================================================================== -- File manager with editor and the Configs page in the web panel. -- Needs the permission web_files, which only wildcard ranks have until you -- give it to someone in the rank editor. ReadOnly = true: look, not change. -- Newer FXServer builds only let this resource save into another one when -- server.cfg allows it (one line per resource, then restart the server): -- add_filesystem_permission Agency-Admin write <resource> -- The panel shows the exact lines when one is missing. Config.WebPanelFiles = { Enabled = true, ReadOnly = false, MaxEditKb = 1024, -- largest file the editor opens, in KB (64 - 8192) } --============================================================================== -- INTERNAL (do not edit) --============================================================================== Config.Vehicles = Config.Vehicles or {} Config.VehicleCards = Config.VehicleCards or Config.Vehicles Config.Weapons = Config.Weapons or {} Config.WeaponCards = Config.WeaponCards or Config.Weapons Config.Peds = Config.Peds or {} Config.PedCards = Config.PedCards or Config.Peds Config.CustomPeds = Config.CustomPeds or {} Config.Objects = Config.Objects or {}

ما زلت عالقًا بعد هذه الصفحة؟ فريق الدعم يتولّى الأمر من هنا.