Documentation
Docs/Resources/Base/Drug&Breathaylser
Optional Addon

Drug&Breathaylser

1. Import sql/install.sql. 2. Add inventory images matching the three item image names in Core shared items. 3. Start this resource after core, inventory, logs, oxmysql and statuseffects. 4. Configure police jobs, limits, durations, commands and equipment in config.lua. Officers can use the equipment items or /roadside, /breathtest and /drugtest. The subject must consent. Results are calculated by the server from VCORE status effects and registered substance exposures; players cannot type their own result. Drug-producing or consumable resources can call the server exports AddSubstanceExposure(source, substance, level, duration) and AddAlcoholExposure(source, micrograms, duration). Only resources listed in Config.Exposure.allowedResources may record exposure.

v1.0.0VCore FrameworkNot enabled in supplied server.cfg

Introduction

1. Import sql/install.sql. 2. Add inventory images matching the three item image names in Core shared items. 3. Start this resource after core, inventory, logs, oxmysql and statuseffects. 4. Configure police jobs, limits, durations, commands and equipment in config.lua. Officers can use the equipment items or /roadside, /breathtest and /drugtest. The subject must consent. Results are calculated by the server from VCORE status effects and registered substance exposures; players cannot type their own result. Drug-producing or consumable resources can call the server exports AddSubstanceExposure(source, substance, level, duration) and AddAlcoholExposure(source, micrograms, duration). Only resources listed in Config.Exposure.allowedResources may record exposure.

1Client Lua
1Server Lua
6Exports
11Events
1SQL tables

UI page: html/index.html

Dependencies & References

ResourceDetected asPackage status
coreManifest dependencyIncluded in Base
inventoryManifest dependencyIncluded in Base
logsManifest dependencyIncluded in Base
oxmysqlManifest dependencyExternal / prerequisite
statuseffectsManifest dependencyIncluded in Base

Cross-resource export calls

ResourceFunctions called
coregetCoreObject
inventoryAddItem, GetItemAmount
logsLog
statuseffectsGetStatusEffectValue

Installation / Start Order

The updated server.cfg explicitly classifies Drug&Breathaylser under Addons and extras. It is optional and is not started by default.

server.cfg
ensure Drug&Breathaylser

Keep the addon after its required framework dependencies. Global Vcore prerequisites and database setup are documented in Getting Started.

Configuration

Config files

  • config.lua

Top-level config keys detected

CommandsConsentTimeoutDebugExposureGiveResultItemItemsMaxDistancePoliceJobsRequestCooldownSubstancesTests

Events, Exports & Callbacks

Exports

Client exports2
  • StartBreathTest
  • StartDrugTest
Server exports4
  • AddAlcoholExposure
  • AddSubstanceExposure
  • ClearSubstanceExposure
  • GetRoadsideTest

Callbacks

No Vcore callback registrations were detected.

Registered network events

Client registered events8
  • vcore_roadside:client:beginOfficer
  • vcore_roadside:client:beginSubject
  • vcore_roadside:client:consent
  • vcore_roadside:client:endTest
  • vcore_roadside:client:notify
  • vcore_roadside:client:result
  • vcore_roadside:client:showReport
  • vcore_roadside:client:use
Server registered events3
  • vcore_roadside:server:complete
  • vcore_roadside:server:consent
  • vcore_roadside:server:request

Commands

No commands were detected.

Database / SQL

FileType
sql/install.sqlResource SQL file
vcore_roadside_tests

The root Base package also ships the consolidated VCORE_INSTALL.sql.

Source Layout

AreaDetected files
Client Lua1
Server Lua1
Other/shared Lua2
JavaScript1
HTML1
CSS1
SQL1

Troubleshooting

  • Confirm all manifest dependencies are started before Drug&Breathaylser.
  • This addon is intentionally commented out in the supplied server.cfg. Enable it only after its dependencies are installed.
  • If database queries fail, import the consolidated Base SQL and any resource-local SQL listed above.
  • If the UI fails, verify the resource's NUI files and ui_page when one is declared.