feat: add qbx_bankrobbery event logging integration#25
Draft
Conversation
Agent-Logs-Url: https://github.com/fivemanage/sdk/sessions/7b3cf95c-b87d-478d-9b8a-bc0c0981d896 Co-authored-by: itschip <59088889+itschip@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add third-party logging integration for qbx_bankrobbery
feat: add qbx_bankrobbery event logging integration
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds passive server-side event interception for
qbx_bankrobbery, piping robbery lifecycle events into the SDK'singest()pipeline. Follows the same pattern asox-inventory.ts— no changes to the upstream resource required.New file:
features/logs/server/third-party/qbx-bankrobbery.ts8 events intercepted, split by transport type:
onNet(player-sourced) — capturesplayerSource+playerNameviaglobal.source:setBankState→qbx_bankrobbery.robbery.started(bankId, bankType)callCops→qbx_bankrobbery.alarm.triggered(bankType, bankId, coords)recieveItem→qbx_bankrobbery.loot.received(bankType, bankId, lockerId)SetStationStatus→qbx_bankrobbery.powerStation.hit|restored(stationKey, isHit)removeElectronicKit→qbx_bankrobbery.item.electronicKitUsedremoveBankCard→qbx_bankrobbery.item.bankCardUsed(cardNumber)on(server-local, no player source):setTimeout→qbx_bankrobbery.robbery.bigBankTimeoutStartedSetSmallBankTimeout→qbx_bankrobbery.robbery.smallBankTimeoutStarted(bankId)Config
Gated behind
config.logs.qbxBankrobberyEvents.enabled(defaultsfalse):Schema and valibot
ConfigSchemaupdated accordingly. Import wired intologger.ts.Original prompt
Overview
Add a new third-party logging integration for
qbx_bankrobbery— the Qbox bank robbery resource. This follows the exact same pattern asfeatures/logs/server/third-party/ox-inventory.ts.Files to create/modify
1. Create
features/logs/server/third-party/qbx-bankrobbery.tsIntercepts server-side events from
qbx_bankrobberyand logs them through the SDK'singest()function.Rules:
config.logs.qbxBankrobberyEvents.enabledconfig.logs.qbxBankrobberyEvents.dataset_internal_RESOURCE: "qbx_bankrobbery"in_internalOpts"qbx_bankrobbery.robbery.started") — simple and searchableglobal.sourceto capture source inside handlersingestfrom"../logger"andconfigfrom"~/utils/common/config"Events to intercept:
qbx_bankrobbery:server:setBankState(viaonNet) — handler receives(bankId: string | number)"qbx_bankrobbery.robbery.started"{ playerSource, playerName: GetPlayerName(source.toString()), bankId, bankType: typeof bankId === 'number' ? 'small' : bankId }qbx_bankrobbery:server:callCops(viaonNet) — handler receives(type: string, bank: string | number, coords: number[])"qbx_bankrobbery.alarm.triggered"{ playerSource, playerName: GetPlayerName(source.toString()), bankType: type, bankId: bank, coords }qbx_bankrobbery:server:recieveItem(viaonNet) — handler receives(type: string, bankId: string | number, lockerId: string | number)"qbx_bankrobbery.loot.received"{ playerSource, playerName: GetPlayerName(source.toString()), bankType: type, bankId, lockerId }qbx_bankrobbery:server:SetStationStatus(viaonNet) — handler receives(key: string, isHit: boolean)isHit ? "qbx_bankrobbery.powerStation.hit" : "qbx_bankrobbery.powerStation.restored"{ playerSource, playerName: GetPlayerName(source.toString()), stationKey: key, isHit }qbx_bankrobbery:server:removeElectronicKit(viaonNet) — no params"qbx_bankrobbery.item.electronicKitUsed"{ playerSource, playerName: GetPlayerName(source.toString()) }qbx_bankrobbery:server:removeBankCard(viaonNet) — handler receives(number: number)"qbx_bankrobbery.item.bankCardUsed"{ playerSource, playerName: GetPlayerName(source.toString()), cardNumber: number }qbx_bankrobbery:server:setTimeout(viaon— server-local AddEventHandler, no source) — no params"qbx_bankrobbery.robbery.bigBankTimeoutStarted"{}(no source info available)qbx_bankrobbery:server:SetSmallBankTimeout(viaon) — handler receives(bankId: string | number)"qbx_bankrobbery.robbery.smallBankTimeoutStarted"{ bankId }2. Modify
features/logs/server/logger.tsAdd the import after existing third-party imports:
3. Modify
config.jsonAdd inside
"logs":4. Modify
config.schema.jsonAdd schema entry for
qbxBankrobberyEventsinproperties.logs.propertiesand in therequiredarray:Notes
onNet=RegisterNetEvent(client triggers server),on=AddEventHandler(server-local)qbx_bankrobbery:server:setTimeoutandqbx_bankrobbery:server:SetSmallBankTimeoutare server-localTriggerEventcalls with no player source — do NOT attempt to useglobal.sourcefor themox-inventory.tsThe following is the prior conversation context from the user's chat exploration (may be truncated):
User: How should I integrate these qbox FiveM resources into my fivemanage/sdk resource to handle logging for these qbox FiveM resources. I'm trying to create a large SDK that supports logging for different FiveM frameworks and I need to intercept FiveM events from other resources and log data.
Can you create a little plan of what's possible from what I just added of repos here?
Assistant: Now I have a thorough picture of all repos. Here's the integration plan:
Integration Plan: Qbox → `fiv...
This pull request was created from Copilot chat.