Agency Docs
Standalone

Agency-Progressbar V2 Konfiguration

Fortschrittsbalken im Agency-Design (wie bei Agency-Housing), wobei die Stile V2 Liquid Glass und V1 Classic für jeden.

v2.6.0Kostenlos5 Seiten

01Konfiguration

Schnellinstallation · config.lua · Agency-Progressbar V2

config.lua herunterladen

--[[ ╔══════════════════════════════════════════════════════════════════════╗ ║ AGENCY PROGRESSBAR - CONFIGURATION ║ ║ (c) Agency Scripts ║ ╚══════════════════════════════════════════════════════════════════════╝ CONTENTS 1. Agency Companion The free app for your players, accent colour 2. Core Language, database, menu command, debug 3. Look Default style, position and colour per player 4. Behaviour Fallbacks, animations, limits 5. Integrations Agency-Notify, framework 6. Consumables Food and drink items with a progress bar 7. Reload Ammo items with a progress bar Ad-free and re-brandable: Agency-Essentials (Progressbar + Notify + Elevator + Reports 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/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). Drop it into your -- resources and this progress bar follows it by itself. Nothing else to set up. Config.Companion = { Enabled = true, -- follow Agency-Companion (accent colour) } -- ── 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 settings menu. 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-Hans Config.Language = 'en' Config.DefaultLanguage = Config.Language -- kept for older integrations -- ── Database ───────────────────────────────────────────────────────────────── -- true = every player's settings are saved (needs oxmysql). -- false = everyone starts with the defaults below after a reconnect. Config.UseDatabase = false -- ── Settings menu ──────────────────────────────────────────────────────────── Config.MenuCommand = 'aprogressbar' -- chat command that opens the menu (without /) -- ── Debug ──────────────────────────────────────────────────────────────────── Config.Debug = { enabled = false, -- prints diagnostics to the console } --============================================================================== -- 3 · LOOK --============================================================================== -- The bar always fits the screen resolution by itself. Config.Defaults = { barStyle = 'agency', -- 'agency' (2.5, like Agency-Housing) | 'v2' (liquid glass) | 'v1' (classic) position = 'bottom-center', -- top-center | bottom-center | center | top-left | top-right | bottom-left | bottom-right accentColor = 'agency', -- agency (see section 1) | blue | orange | purple | pink | green | red | cyan | gold barScale = 1.0, -- not used any more (automatic), kept for older saves smartModeEnabled = true, -- tidier labels and adaptive time display } --============================================================================== -- 4 · BEHAVIOUR --============================================================================== Config.EnableAnimations = true Config.MaxProgressTime = 300000 -- longest bar in ms (5 minutes) -- Fallbacks for scripts that call StartProgress without these fields. Config.UI = { position = 'bottom-center', theme = 'modern', -- V1 only: modern | classic | neon | minimal showPercentage = true, showTimer = true, allowCancel = true, cancelKey = 'X', } Config.Animations = { useCustomAnimations = true, -- play the animation passed with a bar disableMovement = false, -- block walking disableCombat = true, -- block combat disableCarMovement = false, -- block vehicle controls disableMouseControl = false, -- block the camera } --============================================================================== -- 5 · INTEGRATIONS --============================================================================== -- ── Notifications ──────────────────────────────────────────────────────────── -- Agency-Notify (free): https://agency-script.tebex.io/package/6937769 -- Used by itself when it runs, otherwise the framework notification. Config.Notifications = { enabled = true, AgencyNotify = { enabled = true, defaultTitle = 'Agency Progressbar', defaultDuration = 6000, -- ms typeDurations = { success = 6000, error = 6000, info = 6000 }, }, } -- ── Framework ──────────────────────────────────────────────────────────────── Config.Framework = { autoDetect = true, -- detect QBCore or ESX manualFramework = 'standalone', -- 'qb' | 'esx' | 'standalone' when autoDetect = false timeout = 5000, -- ms to wait for the framework } --============================================================================== -- 6 · CONSUMABLES --============================================================================== -- true = this resource registers the food, drink and ammo items below as usable. Config.Usables = { enable = true, } Config.Consumables = Config.Consumables or {} Config.Consumables.food = Config.Consumables.food or { ['burger'] = { add = 30, dur = 6000, anim = { dict = 'mp_player_inteat@burger', name = 'mp_player_int_eat_burger', flag = 49 }, prop = { enable = true, model = 'prop_cs_burger_01', pos = vec3(0.0, 0.0, 0.0), rot = vec3(0.0, 0.0, 0.0) } }, -- add more items as needed } Config.Consumables.drink = Config.Consumables.drink or { ['water'] = { add = 30, dur = 6000, anim = { dict = 'mp_player_intdrink', name = 'loop_bottle', flag = 49 }, prop = { enable = true, model = 'prop_ld_flow_bottle', pos = vec3(0.0, 0.0, 0.0), rot = vec3(0.0, 0.0, 0.0) } }, ['water_bottle'] = { add = 30, dur = 6000, anim = { dict = 'mp_player_intdrink', name = 'loop_bottle', flag = 49 }, prop = { enable = true, model = 'prop_ld_flow_bottle', pos = vec3(0.0, 0.0, 0.0), rot = vec3(0.0, 0.0, 0.0) } }, ['ecola'] = { add = 30, dur = 6000, anim = { dict = 'mp_player_intdrink', name = 'loop_bottle', flag = 49 }, prop = { enable = true, model = 'prop_ecola_can', pos = vec3(0.0, 0.0, 0.0), rot = vec3(0.0, 0.0, 0.0) } }, } --============================================================================== -- 7 · RELOAD --============================================================================== Config.Reload = Config.Reload or {} -- Map GTA/QB ammo types to inventory items and bullet amounts per use Config.Reload.AmmoItems = Config.Reload.AmmoItems or { AMMO_PISTOL = { item = 'pistol_ammo', add = 12, duration = 2500 }, AMMO_SMG = { item = 'smg_ammo', add = 30, duration = 3000 }, AMMO_MG = { item = 'mg_ammo', add = 45, duration = 3500 }, AMMO_RIFLE = { item = 'rifle_ammo', add = 30, duration = 3250 }, AMMO_SHOTGUN = { item = 'shotgun_ammo', add = 8, duration = 3200 }, AMMO_SNIPER = { item = 'sniper_ammo', add = 5, duration = 4000 }, AMMO_STUNGUN = { item = 'stungun_ammo', add = 1, duration = 1500 }, AMMO_FLARE = { item = 'flare_ammo', add = 1, duration = 2500 }, AMMO_STINGER = { item = 'stinger_ammo', add = 1, duration = 4500 }, AMMO_GRENADELAUNCHER = { item = 'gl_ammo', add = 1, duration = 4500 }, } -- Optional: Reload animation while progress runs (upper-body) -- Provide a valid anim dict/name; if nil, no reload animation is played during bar Config.Reload.Animation = Config.Reload.Animation or nil -- { dict='...', name='...', flag=49 } -- Toggles Config.Reload.ClientOnly = true -- client-only reload, no server/QB/ESX (does not remove items) Config.Reload.DisableQBProgressbar = true -- always use Agency progressbar (never QB) -- Optional: weapon-specific overrides (clip sizes/durations) Config.Reload.WeaponOverrides = Config.Reload.WeaponOverrides or { -- [joaat('weapon_pistol_mk2')] = { duration = 2800, add = 16 }, }

Kommst du nach dieser Seite nicht weiter? Dann übernimmt unser Support.