Skip to content

fivemanage/fm-qbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fm-qbox

Fivemanage logging integration for Qbox resources.

fm-qbox is a standalone FiveM resource that listens to Qbox server events and sends structured logs through the Fivemanage SDK resource (fmsdk). It is designed to add Qbox-specific audit logs without modifying the upstream Qbox resources.

Requirements

  • fmsdk installed and started
  • A Fivemanage Logs API key configured for fmsdk
  • Qbox resources matching the enabled modules in config.lua

Example server.cfg:

set FIVEMANAGE_LOGS_API_KEY "your_logs_api_key_here"

ensure fmsdk

ensure qbx_core
ensure qbx_management
ensure qbx_bankrobbery
ensure qbx_police
ensure fm-qbox

How It Works

fm-qbox uses server-side event handlers to passively listen for Qbox events, then calls:

exports.fmsdk:Log(dataset, level, message, metadata)

Metadata uses playerSource and targetSource where possible so fmsdk can append player identifiers automatically.

Configuration

All module toggles live in config.lua.

Each module has:

enabled = true,
dataset = 'default',
events = { ... }

Change dataset to route logs to different Fivemanage datasets, for example economy, police, robbery, or management.

Modules

qbx_core

File: server/modules/qbx_core.lua

Listens to QBCore:Server:OnMoneyChange and logs all player money changes.

Messages:

Message Level Notes
qbx_core.money.add info Money added to a player
qbx_core.money.remove info Money removed from a player
qbx_core.money.set info Money balance set

Metadata includes playerSource, playerName, moneyType, amount, actionType, and reason.

qbx_management

File: server/modules/qbx_management.lua

Logs player lifecycle, duty, job/gang updates, and job/gang definition updates.

Messages:

Message Level
qbx_management.player.loaded info
qbx_management.player.unloaded info
qbx_management.player.clockedIn info
qbx_management.player.clockedOut info
qbx_management.player.jobUpdated info
qbx_management.player.gangUpdated info
qbx_management.job.definitionUpdated info
qbx_management.gang.definitionUpdated info

qbx_bankrobbery

File: server/modules/qbx_bankrobbery.lua

Logs bank robbery lifecycle, alarms, loot events, power station status, and consumed robbery items.

Messages:

Message Level
qbx_bankrobbery.robbery.started warn
qbx_bankrobbery.robbery.bigBankTimeoutStarted info
qbx_bankrobbery.robbery.smallBankTimeoutStarted info
qbx_bankrobbery.alarm.triggered warn
qbx_bankrobbery.loot.received info
qbx_bankrobbery.powerStation.hit warn
qbx_bankrobbery.powerStation.restored warn
qbx_bankrobbery.item.electronicKitUsed info
qbx_bankrobbery.item.bankCardUsed info

qbx_police

File: server/modules/qbx_police.lua

Logs police actions, vehicle impounds, evidence, alerts, and player interactions.

Messages:

Message Level
qbx_police.player.jailed info
qbx_police.player.billed info
qbx_police.player.cashSeized info
qbx_police.player.robbed warn
qbx_police.vehicle.impounded info
qbx_police.vehicle.sentToDepot info
qbx_police.vehicle.unimpounded info
qbx_police.player.radarFined info
qbx_police.player.handcuffed info
qbx_police.player.unhandcuffed info
qbx_police.player.escorted info
qbx_police.player.kidnapped warn
qbx_police.player.searched info
qbx_police.player.trackerUpdated info
qbx_police.vehicle.flaggedPlateDetected info
qbx_police.player.removedFromVehicle info
qbx_police.player.putInVehicle info
qbx_police.evidence.bloodDropped debug
qbx_police.evidence.fingerprintDropped debug
qbx_police.evidence.casingDropped debug
qbx_police.evidence.bloodCollected info
qbx_police.evidence.fingerprintCollected info
qbx_police.evidence.casingCollected info
qbx_police.evidence.bloodCleared info
qbx_police.evidence.casingsCleared info
qbx_police.alert.dispatched info

Important Behavior Notes

This resource is passive. It listens for events emitted by Qbox resources.

Some Qbox events are fired before the original resource finishes all validation. For those events, fm-qbox should be treated as logging the event attempt, not always the final successful outcome.

For guaranteed outcome logging, patch the source Qbox resource after its permission checks, validation checks, and successful state mutation.

Examples that may need source patches for perfect audit accuracy:

Resource Action Type
qbx_adminmenu lib.addCommand, lib.callback.register, client-only admin toggles
qbx_police Command-only actions such as license grants/revokes and some payments
qbx_bankrobbery Exact loot item and amount unless covered by inventory logging

fmsdk Configuration

Make sure fmsdk/config.json has cloud logging enabled and the desired minimum log level.

Example:

{
  "logs": {
    "level": "info",
    "console": false,
    "enableCloudLogging": true,
    "appendPlayerIdentifiers": true,
    "excludedPlayerIdentifiers": ["ip"]
  }
}

Evidence drop logs are currently emitted at debug, so they require the fmsdk log level to include debug if you want them sent.

About

Fivemanage Qbox Module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages