STG ScriptsDocumentation
Argus Admin

Configuration

Every option in STG Argus Admin shared/config.lua and shared/functions.lua, from the panel look and tickets to screenshots, jail, weather, logs and Discord webhooks.

All settings live in stg-argusadmin/shared/config.lua. Ranks and what each rank may do are in shared/permissions.lua, covered on the Permissions page. Integrations with other resources are in shared/functions.lua. All three files stay editable in the escrow version. Restart the resource after a change.

Server identity

Config.Brand = 'STG'
Config.ServerName = 'stgscripts.com'

The header at the top left of the panel. Brand is the big line and ServerName the small line under it. Brand is also the name Discord webhook messages are posted under, and ServerName appears in their footer. Replace shared/logo.png with your own image to change the square logo.

Opening the panel

Config.Command = 'argusadmin'
Config.Keybind = 'F6'
  • Command: chat command that opens the panel.
  • Keybind: default key for the same command. Players can rebind it in the FiveM key binding settings, where it is listed as Admin menu.

Players below Config.RequiredPermission get nothing when they press the key, not even a message.

Language

Config.Language = 'en'

Available: en, de, fr, es, pt, it, nl, pl, sv, no, fi, cs, ar, he, jp, zh. The panel and the notifications both read from it. To change a text, edit the matching file in stg-argusadmin/locales/. To add a language, copy locales/en.lua, change the code inside it and set Config.Language to that code.

Speed unit

Config.SpeedType = 'mph'

Unit for the top speed on the vehicle information card. Use 'mph' or 'km/h'.

Who may open the panel

Config.RequiredPermission = 'mod'
Config.Ranks = { 'user', 'mod', 'admin', 'god' }
Config.RankAliases = { ... }
Config.AceRanks = { ... }

These decide who counts as staff. They are explained on the Permissions page.

Accent colours

Config.Accents = {
    { id = 'blue', color = '#00a6fa' },
    { id = 'violet', color = '#7c5cff' },
    { id = 'green', color = '#42cc90' },
    { id = 'amber', color = '#e0a458' },
    { id = 'red', color = '#f44144' },
    { id = 'purple', color = '#a855f7' },
    { id = 'pink', color = '#ec4899' },
}

Colours a staff member can pick in the panel Settings tab. id is what gets saved for them, color is the hex the panel paints with. Add or remove a line and the swatch row follows.

Panel defaults

Config.PanelDefaults = {
    accent = 'blue',
    scale = '100',
    dim = 'None',
    blur = true,
    animations = true,
    confirm = true,
    stream = true,
}

What a staff member sees before they change anything in the Settings tab. Once they change a setting, their choice is saved for them in the database.

Prop

Type

Avatars

Config.Avatars = {
    provider = 'none',
    botToken = '',
    steamApiKey = '',
    interval = 30,
}

Profile pictures next to player names in the panel, logs and tickets.

Prop

Type

Players without the matching identifier keep the default picture. If Discord rejects the bot token, the server console says so and avatars stay off.

Staff duty

Config.Duty = {
    default = true,
    onDutyOnly = true,
    jobs = {
        { job = 'police', label = 'Police' },
        { job = 'ambulance', label = 'EMS' },
        -- ...
    },
}

Config.RequireDuty = true

Prop

Type

RequireDuty: when true, every admin action is blocked while the staff member is off duty. The panel still opens so they can read, and the duty button always works. Duty minutes and action counts are saved per staff member and shown in the Staff tab.

Announcements

Config.Announce = {
    popup = true,
    eventDuration = 14,
}
  • popup: show announcements as a banner at the top of the screen. Set to false to show them as a normal notification. The duration of a normal announcement is picked in the panel.
  • eventDuration: seconds a scheduled event banner stays on screen. Events are planned in the panel and announced to everyone when their start time arrives.

Tickets

Config.Ticket = {
    command = 'ticket',
    nearbyRadius = 20.0,
    maxPeople = 5,
    cooldown = 60,
    screenshot = true,
    chatLimit = 60,
}

Prop

Type

A player can have one open ticket at a time. On duty staff are notified of every new ticket, and the player is told when someone claims it.

Admin tag

Config.AdminTag = {
    distance = 60.0,
    scale = 0.45,
    color = { 255, 82, 82 },
}

Floating [RANK] Name tag drawn above staff who switch the Admin tag tool on. distance is how far away it can be seen, scale is the text size and color is RGB.

Player names

Config.PlayerNames = {
    distance = 100.0,
    scale = 0.4,
    showId = true,
    showHealth = true,
}

Name tags drawn above every player while the Player names tool is on.

Prop

Type

Sounds

Config.Sounds = {
    enabled = true,
    volume = 0.5,
}

Plays web/sounds/notify.mp3 when a ticket is opened, when a reply arrives and when a ticket is claimed. volume runs from 0 to 1.

Screenshots

Config.Screenshot = {
    encoding = 'webp',
    maxWidth = 3840,
    maxHeight = 2160,
    quality = 0.85,
    uploadUrl = '',
    uploadHeaders = {},
    uploadField = 'file',
    cooldown = 8,
    concurrent = 1,
    timeout = 20,
    maxBytes = 4000000,
}

Screenshots work with screencapture or screenshot-basic. screencapture is used first when both are running.

Prop

Type

Monitor mode

Config.Monitor = {
    interval = 0.5,
    width = 1280,
    height = 720,
    quality = 0.5,
}

Monitor mode streams a player's screen as frames on a timer instead of one shot.

  • interval: seconds between frames, so 0.5 is two frames a second. Going below about 0.3 adds traffic without getting faster.
  • width and height: frame size. A live feed trades detail for bandwidth, so it is smaller than a screenshot.
  • quality: encoding quality from 0 to 1.

Jail

Config.UseAdminJail = true

Config.Jail = {
    coords = { x = 1691.0, y = 2565.0, z = 45.5 },
    radius = 70.0,
    cells = {
        { x = 1779.0, y = 2568.0, z = 45.8 },
        -- ...
    },
    release = { x = 1845.0, y = 2585.0, z = 45.8 },
}

UseAdminJail: true uses the jail that ships with the panel. Set to false to send jailed players to your jail resource instead (qbx_prison, qb-policejob, rcore_prison, wasabi_police, nc_prison or esx_jail). If none of them is running, the admin jail is used anyway.

Prop

Type

In the admin jail, weapons are removed, shooting is disabled and players are taken out of vehicles. The sentence is saved in the database and continues when the player reconnects. A sentence can be at most 10080 minutes (7 days).

Weather and time

Config.World = {
    sync = true,
    minuteInterval = 2,
    syncBlockers = {
        'Renewed-Weathersync',
        'qb-weathersync',
        'cd_easytime',
        'vSync',
        'av_weather',
        'weathersync',
    },
}

Prop

Type

When Renewed-Weathersync is running, weather, time, blackout and freeze time changes from the panel are written to it directly.

Logs

Config.Logs = {
    buffer = 500,
    persist = true,
    retentionDays = 30,
}

Config.Logs.categories = {
    'connection', 'chat', 'money', 'item', 'vehicle', 'admin', 'death', 'anticheat',
}

Prop

Type

Logs can be exported from the panel to a JSON file in stg-argusadmin/exports/.

Discord webhooks

Config.Webhooks = {
    default = '',
    connection = '',
    chat = '',
    admin = '',
    anticheat = '',
    death = '',
    money = '',
    item = '',
    vehicle = '',
}

Config.WebhookLevels = {
    danger = true,
    warn = true,
    brand = true,
    ok = false,
    info = false,
    muted = false,
}
  • Webhooks: a Discord webhook url per log category. Leave a category empty to use default, leave both empty to send nothing for it.
  • WebhookLevels: which log levels are forwarded. Each entry has a level that also sets its colour in Discord.
LevelUsed by default for
dangerDeaths, anticheat, bans
warnNew tickets, explosion detections
brandAdmin actions
okMoney
infoConnections, chat, items, vehicles
mutedPlayers leaving, opening the panel

With the default levels, connection, chat, money, item and vehicle logs are not sent to Discord even when their url is filled. Set ok and info to true to forward them.

Flags

Config.Flags = {
    warnThreshold = 3,
    window = 3600,
}
  • warnThreshold: a player is marked as flagged in the panel after this many warnings.
  • window: seconds an anticheat detection keeps a player flagged.

Console buffer

Config.ConsoleBuffer = 300

How many server console lines the Console tab keeps.

Refresh interval

Config.RefreshInterval = 5

How often the open panel pulls fresh data from the server, in seconds. The lowest value used is 2. Set to 0 to only refresh after an action.

Chat state bags

Config.ChatStateBags = {
    me = '/me',
    ['do'] = '/do',
    ooc = '/ooc',
}

Roleplay commands that publish through a player state bag instead of chat. QBOX does this for /me, so those lines never reach the normal chat log. The key is the state bag name, the value is the label shown in the chat log.

Plates

Config.Plate = {
    Prefix = 'STG',
    UsePrefix = true,
    Letters = 3,
    Numbers = 3,
    UseDash = true,
}

Plate generated when a vehicle is spawned from the panel without one: the prefix, then random letters, an optional dash and random numbers. The result is cut to 8 characters, so keep the total at 8 or less.

Licences

Config.Licenses = {
    'driver',
    'weapon',
    'business',
    'pilot',
}

Licences offered when you grant one by hand on the player card. Use the key your framework stores, not the label it shows.

Default garage

Config.DefaultGarage = 'pillboxgarage'

Garage a vehicle is parked in when the panel saves it to a player on QBCore or QBOX.

Locations

Config.Locations = {
    { id = 'mrpd', label = 'MRPD', coords = { x = 441.0, y = -982.0, z = 30.7 } },
    { id = 'pillbox', label = 'Pillbox', coords = { x = 298.6, y = -584.5, z = 43.3 } },
    -- ...
}

Preset places a player can be sent to from the Bring menu. id must be unique, label is the text shown and the player is told where they were moved.

Integrations

shared/functions.lua is where the panel talks to other resources. Each function checks which resource you run and calls it, so a custom resource only needs one more branch.

Config.Functions = {
    CustomNotify = true,
    Notify = function(type, message, duration) ... end,
    -- ...
}
FunctionWhat it does
CustomNotifytrue uses the panel's own notifications, false uses ox_lib.
NotifyEvery notification. Replace the body to use your own system.
ShowHelpNotify, HideHelpNotifyText shown while spectating or in jail, ox_lib text UI by default.
GetLicenses, SetLicenseRead and grant licences. QBCore and QBOX use player metadata, ESX uses esx_license. Replace both bodies for a custom licence system.
OpenClothingClothing menu from the panel.
GiveKeys, RemoveKeysVehicle keys for spawned vehicles.
GetFuel, SetFuelFuel on the vehicle card and when refuelling.
HideHud, ShowHudHides your HUD while the panel is open.
JailJail resource used when Config.UseAdminJail is false.
OpenInventory, ClearInventoryOpen or wipe a player's inventory.
Revive, HealRevive and heal through your medical resource. Without one, the native revive is used.

See Dependencies for the resources each function supports out of the box.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page