CameraNewFree

Camera: Installation

Get the CCTV system with face recognition running on your server in a few minutes.

v1.0.0Open sourceFreeQBox · QBCore · ESX

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

ResourceRequiredNotes
ox_libYesThe only hard dependency
qbx_core / qb-core / es_extendedYesOne of them, picked automatically
ox_target / qb-targetOptionalWithout one, no terminals are created
ox_lib / okokNotify / ps-uiOptionalNotifications, 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.

fxmanifest.lua

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.

server.cfg
ensure ox_lib
ensure qbx_core          # or qb-core / es_extended
ensure ox_target         # or qb-target

# HypeScripts
ensure hype-camera

Set 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_core

Join 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 Open export. 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 W A S D and 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

StateMeaning
LOW RESOLUTIONThe subject is too far for the current zoom, zoom in
ANALYZINGThe face is being scanned, keep the crosshair on it
QUERYING DATABASEWaiting for the record from the server
NO MATCHThe face is covered by a mask, helmet or glasses
NO FACE DETECTEDThe subject is not facing the camera
MATCH FOUNDIdentified, the record and photo are shown

Viewer controls

KeyAction
W A S DPan and tilt
SHIFTMove faster
Mouse wheelZoom
Q / E, ← / →Previous / next camera
BACKSPACEBack to the camera list
ESCClose the viewer
CCopy the camera position (Debug only)

In the camera list, ESC clears the search first and closes the list on the next press.

Next steps

On this page