Camera: Installation
Get the CCTV system with face recognition running on your server in a few minutes.
Before you start
Make sure OneSync is enabled and your server artifact is up to date. The script detects your framework, target and notification resource on its own. It needs no database and no items.
Requirements
| Resource | Required | Notes |
|---|---|---|
| ox_lib | Yes | The only hard dependency |
| qbx_core / qb-core / es_extended | Yes | One of them, picked automatically |
| ox_target / qb-target | Optional | Without one, no terminals are created |
| ox_lib / okokNotify / ps-ui | Optional | Notifications, see Notifications in the config |
On ESX, face recognition reads the esx_identity fields. Nationality and phone are only shown when another resource
stores them on the player (xPlayer.set('nationality', ...), xPlayer.set('phoneNumber', ...)).
See Dependencies for download links and the start order.
Setup
Download the resource
Get the latest version from portal.cfx.re. See Download your purchase. The script is free and open source (MIT), so you can also get it from GitHub. See Free scripts.
Keep the folder name
Keep the folder named hype-camera. Every export is called through this name.
The interface ships prebuilt in web/build. You only need Node.js if you want to change it (see the
FAQ).
Start the resource
Add it to server.cfg after ox_lib, your framework and target.
ensure ox_lib
ensure qbx_core # or qb-core / es_extended
ensure ox_target # or qb-target
# HypeScripts
ensure hype-cameraSet the basics
Open config/config.lua and check at least Access.groups and Terminals. The 37 cameras in config/cameras.lua work
out of the box. See Configuration for every option.
Start order matters
If hype-camera starts before your framework, the console prints No supported framework found and nobody gets
access to the cameras.
Verify
Set Debug = true in the config and start the server. Look for these lines in the console:
[DEBUG:SERVER] [INFO] camera server loaded: 37 cameras, requireDuty=true, ace=group.admin, destroy=true
[DEBUG:SERVER] [INFO] framework bridge: qbx_coreJoin an allowed job (default: police or sheriff), go on duty and walk to a terminal (default: the Mission Row PD
computer). Pick Security Cameras with your target and the camera list opens.
Connect to a camera. Steer it with W A S D, zoom with the mouse wheel and switch cameras with Q / E.
Shoot a camera at one of the stores. It sparks, and the list shows it as damaged with a countdown. When everything works,
set Debug = false again.
How it works
- Access: allowed players open the camera list at the station terminals, with a command or from your own menu
through the
Openexport. Every access check runs on the server. - Camera list: a searchable list with category filters, the number of online cameras and the status of each one. Damaged cameras show a countdown until they come back.
- Steering and zoom: every camera turns with
WASDand zooms smoothly with the mouse wheel, within its own field of view and turning limits. Turning slows down as you zoom in. - Face recognition: hold the crosshair on a player's head. After a short scan, the server returns their record and a photo. Every identified and masked subject is added to an on-screen detection log with the time and camera.
- Masks and disguises: masked players, configured helmets and glasses, and players facing away cannot be identified. The recognition range grows as you zoom in.
- Signal loss: when a camera is switched off or shot while you watch it, the picture switches to SIGNAL LOST, or DAMAGED with a countdown.
- Destructible cameras: shooting a camera takes it offline for a while. Existing CCTV props on the map are used, and a prop is placed where the map has none.
Face recognition states
| State | Meaning |
|---|---|
LOW RESOLUTION | The subject is too far for the current zoom, zoom in |
ANALYZING | The face is being scanned, keep the crosshair on it |
QUERYING DATABASE | Waiting for the record from the server |
NO MATCH | The face is covered by a mask, helmet or glasses |
NO FACE DETECTED | The subject is not facing the camera |
MATCH FOUND | Identified, the record and photo are shown |
Viewer controls
| Key | Action |
|---|---|
W A S D | Pan and tilt |
SHIFT | Move faster |
| Mouse wheel | Zoom |
Q / E, ← / → | Previous / next camera |
BACKSPACE | Back to the camera list |
ESC | Close the viewer |
C | Copy the camera position (Debug only) |
In the camera list, ESC clears the search first and closes the list on the next press.
Next steps
FAQ
Fixes for the most common Trucker Job problems, from missing tables and spawn points to licenses, permissions, NPC workers and closed businesses.
Configuration
Every option in config/config.lua and config/cameras.lua, from access rules and terminals to face recognition, masks and destructible cameras.