Skip to content

Customization

The settings are in config.lua. The two bridge files are open so you can adapt the framework side. The tablet itself is plain HTML in html/.


FileWhat it decidesOpen?
config.luaLanguage, framework, photos, the creator command, the live grid, who can use the tablet, and camera propsYes
bridge/client_bridge.luaFramework detection, the player’s job, notifications, and the help-text promptYes
bridge/server_bridge.luaFramework detection, identifiers, jobs, usable items, adding and removing items, server notificationsYes
items/Item definitions for ox, qb and ESX, and the icons in items/images/Yes
html/The tablet: index.html, app.js, app.css, the map (map.js, map.css) and its tiles in html/tiles/Not escrowed
locales/*.luaEvery string, in game and on the tabletEscrowed in this version
client/, server/The scriptEscrowed

OptionWhat it doesDefault
Config.LocaleWhich language is used'en'
Config.Frameworkesx, qbcore, or auto to detect it. On QBox, auto finds it as qbcore through its QBCore compatibility; to pin it, use qbcore'auto'
Config.EvidenceEnabledPhotos on or off. Off, Space in a camera and the grid’s snapshot do nothingtrue
Config.CreatorCommandThe command that opens the admin creator'camcreator'
Config.CreatorAceThe ACE permission the creator needs'mic_cctvcreator.open'
Config.LiveGridFPSHow often the grid refreshes each second. 1 to 15; higher is smoother and heavier5
Config.BlackScreenBehindUIDraws black behind the tablet so the jumps between cameras while the grid refreshes are hiddentrue
Config.AllowedJobsJobs allowed to open the tablet. Empty means everybody. See below{}
Config.SpawnDistanceHow close you have to be for a camera prop to be spawned60.0
Config.BreakableCameraWhether cameras can be broken at alltrue
Config.RepairDistanceHow far the repair laser reaches20.0
Config.RepairTimeHow long a repair takes, in milliseconds5000

This is the part worth deciding before anybody places a camera.

  • Anybody with a cctv_tablet can open it.
  • A camera a player places is private: only they see it.
  • The owner can then share it with their job — it becomes a job camera for everybody in that job — or give it an access name and password. Anybody who types those into their tablet adds the camera to it.

Config.AllowedJobs set, for example police and sheriff

Section titled “Config.AllowedJobs set, for example police and sheriff”
  • Only those jobs can open the tablet; anybody else is told they are not authorized.
  • A camera a player places becomes a job camera for the job they are in at that moment.

Always job cameras, visible to every job ticked in the creator. A creator camera with no job ticked is visible to nobody.

  • A photo taken from a private camera is private to whoever took it. A photo from a job camera belongs to the job. Either can be shared with your job from the gallery.
  • Breach logs show for every camera you have access to — the 30 most recent. Repairing a camera clears its log.

The owner can remove their camera from the tablet and gets the item back.


With Config.BreakableCamera on, a camera goes offline when a bullet lands within about a metre of it, or when it is hit by melee, an explosion or a vehicle. The creator can mark individual cameras as unbreakable.

The repair kit, cctv_repair, turns on a laser. Aim it at a broken camera within Config.RepairDistance, press E, and wait Config.RepairTime. The kit is not used up. Backspace or ESC puts it away.


Placing a camera (from an item)

KeyWhat it does
Look aroundMoves the preview to the surface you are looking at
Scroll wheelRotates it
EPlaces it; you are asked for a name
Right click / ESCCancels

Looking through a camera

KeyWhat it does
W / STilt up and down
A / DTurn. Wall and pole cameras stop at 45° either way; 360° models go all the way round
Scroll wheelZoom
EnterCycle normal, night vision and thermal
SpaceTake a photo for the evidence gallery
Backspace / ESCBack to the tablet

The admin creator (/camcreator)

Pick a model (wall, 360 wall, pole, 360 pole), a base name, the jobs that can see it and whether it can be broken, then enter placement mode:

KeyWhat it does
← / →Switch model
Scroll wheelRotate
EPlace; you are asked for a name
Right click / ESCBack to the creator menu

CommandWhoWhat it does
/camcreatorPlayers with the Config.CreatorAce permissionOpens the admin creator. Change the name with Config.CreatorCommand

Grant the permission in server.cfg with an add_ace line for the group you want, for example giving mic_cctvcreator.open to group.admin. If you change Config.CreatorAce, grant the new name instead.


Client-side, for other resources that need to know about the cameras:

ExportArgumentsReturns
GetCameraStatuscamera id'online', 'broken', or 'offline' if the id is unknown
GetCameraIdFromEntityentity handleThe camera id of a spawned camera prop, or nothing
IsPlacing—true while the player is placing a camera
HideNearbyCameracoordsHides the nearest camera prop within 2 m and returns it
UnhideCamerapropShows a prop hidden with HideNearbyCamera again

Eleven ship: en, es, fr, de, it, pt, ar, ja, pl, ru, tr. Set Config.Locale to the code. The tablet and the in-game text use the same file.

In this version the files in locales/ are part of the protected code, so they cannot be edited. If you need a language that is not there, or different wording, ask on the Discord.


FileWhat it covers
bridge/client_bridge.luaFramework detection, Bridge.GetPlayerJob, Bridge.Notify, and Bridge.ShowTextUI / Bridge.HideTextUI for the repair prompt
bridge/server_bridge.luaFramework detection, Bridge.GetPlayerIdentifier, Bridge.GetPlayerJob, Bridge.RegisterUsableItem, Bridge.AddItem, Bridge.AddItemWithMetadata, Bridge.RemoveItem, Bridge.Notify

A different notification resource: change Bridge.Notify in both files.

A different text UI (ox_lib, okok…): Bridge.ShowTextUI and Bridge.HideTextUI in the client file. On QBCore they use QBCore’s own DrawText; otherwise the game’s help text.

Inventory: when ox_inventory is running, items are added and removed through it on either framework. Otherwise the framework’s own functions are used.

A different framework: set Config.Framework and fill in the detection block and the identifier, job and item functions in both files. Without a framework the script falls back to the license: identifier and treats everybody as unemployed, but items — the tablet included — are only registered on ESX and QBCore (QBox included, through its QBCore compatibility).