Retro Hidden Mic
This section covers exports, events, usable items, and integration points for developers. The framework, notification, progress bar, and target bridges all live in the open framework/ folder, so you can adapt them without touching escrowed code.
How Players Use It
Section titled โHow Players Use ItโThe script is driven entirely by inventory items and target interactions - there are no chat commands by default.
| Action | Trigger |
|---|---|
| Plant a room bug | Use the room_bug item, then place it on a surface |
| Plant a wearable wire | ox_target/qb-target option on another player (requires player_bug) |
| Plant a vehicle bug | ox_target/qb-target option on a vehicle (requires vehicle_bug) |
| Deploy a jammer | Use the bug_jammer item |
| Deploy an amplifier | Use the bug_signal_amplifier item |
| Detect / remove bugs | Equip WEAPON_DIGISCANNER, then press the Config.KeyRemoveBug key |
| Open the wiretap panel | Target the command center point (job/grade gated) |
Scanner Exports
Section titled โScanner ExportsโThe scanner module (client/scaner.lua) exposes exports so other resources can drive the detection UI.
-- Start the scanner UI aimed at a target positionexports[GetCurrentResourceName()]:InitializeScannerUI(targetVector, parameters)
-- Update the target while the scanner is running (used for moving bugs)exports[GetCurrentResourceName()]:RefreshScannerData(newCoords, newBugId, isDynamicState)
-- Stop the scanner UIexports[GetCurrentResourceName()]:HaltScanner()
-- Returns true while the scanner UI is activelocal running = exports[GetCurrentResourceName()]:IsScannerRunning()Usable Items
Section titled โUsable ItemsโEach device is registered as a usable inventory item on the server via the framework bridge. Changing the item names in config/config.lua automatically re-registers them.
-- server/server.lua (registered through the framework bridge)Framework.TS.RegisterUsableItem(Config.BugItem, function(source) ... end) -- room_bugFramework.TS.RegisterUsableItem(Config.BugPlayerItem, function(source) ... end) -- player_bugFramework.TS.RegisterUsableItem(Config.BugVehicleItem, function(source) ... end) -- vehicle_bugFramework.TS.RegisterUsableItem(Config.JammerSetup.Item, function(source) ... end) -- bug_jammerFramework.TS.RegisterUsableItem(Config.AmplifierSetup.Item, function(source) ... end) -- bug_signal_amplifierServer Events & Callbacks
Section titled โServer Events & CallbacksโPlacement and persistence run through server events (namespaced ts_podsluch_v2:) and ox_lib callbacks.
-- PlacementTriggerServerEvent('ts_podsluch_v2:server:placeBug', coords)TriggerServerEvent('ts_podsluch_v2:server:placeBugOnPlayer', targetId)TriggerServerEvent('ts_podsluch_v2:server:placeBugOnVehicle', netId, plate)TriggerServerEvent('ts_podsluch_v2:server:placeJammer', coords)TriggerServerEvent('ts_podsluch_v2:server:placeAmplifier', coords)
-- RemovalTriggerServerEvent('ts_podsluch_v2:server:removeJammer', jammerId)TriggerServerEvent('ts_podsluch_v2:server:removeAmplifier', amplifierId)
-- Panel data, notes & renameTriggerServerEvent('ts_podsluch_v2:server:requestBugList')TriggerServerEvent('ts_podsluch_v2:server:saveNote', bugId, noteText)TriggerServerEvent('ts_podsluch_v2:server:saveName', bugId, customName)TriggerServerEvent('ts_podsluch_v2:server:startListening', bugId)
-- Pre-placement validation (ox_lib callbacks)lib.callback.await('ts_podsluch_v2:server:canPlaceBugOnPlayer', false, targetId)lib.callback.await('ts_podsluch_v2:server:canPlaceBugOnVehicle', false, netId)Command Centers
Section titled โCommand CentersโCommand centers are defined in config/config.lua and built into target zones in client/target.lua. Access is checked per center against the playerโs job and grade.
-- client/target.lua: canInteract check (open file)canInteract = function() local playerJob = Framework.TS.GetPlayerJob() if not playerJob then return false end if center.jobs then for jobName, minGrade in pairs(center.jobs) do if playerJob.name == jobName and playerJob.grade >= minGrade then return true end end return false end return trueendFramework Bridge
Section titled โFramework BridgeโIf you run a non-standard framework resource name or a custom notification/progress system, adapt the open bridge files instead of the escrowed core.
| File | Responsibility |
|---|---|
framework/main.lua | TextUI + target abstractions, localization (_U) |
framework/cl-functions.lua | Core getter, Framework.TS.Notification, Framework.TS.ProgressBar, callbacks |
framework/sv-functions.lua | Server-side framework helpers and RegisterUsableItem |
-- framework/cl-functions.lualocal framework = Config.Framework or 'ESX'
if framework == 'ESX' then Core = exports["es_extended"]:getSharedObject() ESX = exports["es_extended"]:getSharedObject()elseif framework == 'QBCore' then Core = exports['qb-core']:GetCoreObject()elseif framework == 'Qbox' then Core = exports['qbx_core']end