Target tracking, thermal and night vision, ground lock, spotlight control, hover and orbit assistance, points of interest, rappelling and multi-crew camera hand-off.
Cortex PolCam is a configurable airborne camera resource for FiveM law-enforcement and public-safety roleplay servers.
It provides a FLIR-inspired NUI, smooth zoom and camera motion, vehicle and pedestrian tracking, plate visibility logic, synchronised spotlights, points of interest, ground locking and shared camera state between helicopter crew members.
The system is framework-light. Core camera behaviour is implemented in Lua with a small HTML, CSS and JavaScript NUI.
- Smooth camera rotation and zoom
- Configurable field-of-view limits
- Ground-position locking
- Street and postal overlays
- Heading, altitude, speed and range information
- Per-model and per-livery agency labels
- High-contrast interface themes
- Optional pilot HUD
- Configurable native audio feedback
- Standard camera view
- Night vision
- Thermal imaging
- Configurable default mode and feature availability
- Lock vehicles and pedestrians
- Distance-scaled target acquisition
- Configurable vehicle and pedestrian ranges
- Smooth camera following
- Plate visibility angle checks
- Occlusion detection
- Grace period before dropping an obstructed target
- Persistent target labels
- Entity-pool fallback scanning
- Camera-following searchlight
- Network-synchronised direction and position
- Configurable brightness, range, radius and colour
- Adjustable update and smoothing intervals
- Hover assistance
- Orbit assistance around a selected position or target
- Damage checks before autopilot operation
- Configurable orbit radius and correction behaviour
- Natural sway and gust parameters
- Shared camera state between helicopter occupants
- Camera hand-off between operators
- Restoration of tracked targets after takeover
- Restoration of ground lock and vision mode
- Server-side active air-feed registry
- Datalink access to tracked vehicles
- Place temporary world markers from the camera
- Synchronise markers with other players
- Configure maximum active markers and expiry time
- Remove nearby markers through a keybind
- Rappel from configured helicopter seats
- Enforce minimum and maximum altitude
- Whitelist or blacklist specific helicopter models
- Synchronise rappel state to nearby players
| Resource | Required | Purpose |
|---|---|---|
es_lib |
Yes | Notifications, target-lock progress and debug tools |
es_hud |
No | Hides the player HUD and can force the aircraft HUD |
nearest-postal |
No | Supplies postal data for the camera overlay |
es_lib must start before polcam.
- Download the latest release or clone the repository.
- Place the resource in the server's resources directory.
- Ensure the folder is named
polcam, unless all references are updated. - Install and configure
es_lib. - Review
config.lua. - Add the resources to
server.cfgin dependency order.
ensure es_lib
ensure es_hud
ensure nearest-postal
ensure polcamOnly es_lib is required. Remove optional resources from the configuration when they are not installed.
Restart the server and test the camera in a configured helicopter model.
| Action | Default key |
|---|---|
| Toggle camera | E |
| Toggle camera UI | H |
| Toggle street overlay | N |
| Toggle hover assistance | X |
| Toggle orbit assistance | O |
| Toggle spotlight | L |
| Cycle spotlight colour | K |
| Cycle vision mode | V |
| Lock or unlock target | SPACE |
| Lock camera to ground | T |
| Place point of interest | G |
| Delete nearest marker | DELETE |
| Open debug tools | F10 |
All keybinds are configurable in config.lua.
All settings are held in config.lua.
Config.AllowedHelicopters = {
"polmav",
"maverick"
}
Config.AllowedSeats = { -1, 0, 1, 2 }
Config.InstantLock = falseConfig.Camera = {
MinZoom = 1.0,
MaxZoom = 30.0,
DefaultZoom = 5.0,
DefaultFOV = 50.0,
MinFOV = 2.0,
MaxFOV = 70.0,
RotationSpeed = 3.0,
RenderDistance = 1000.0
}Config.Tracking = {
Enabled = true,
LockDurationMs = 1200,
TrackVehicles = true,
TrackPeds = true,
TrackingSpeed = 12.0,
TargetingMaxDistanceVehicles = 1000.0,
TargetingMaxDistancePeds = 1000.0,
OcclusionEnabled = true,
OcclusionGracePeriodMs = 3000
}Config.Vision = {
DefaultMode = "normal",
NightVision = {
Enabled = true,
Intensity = 0.7
},
Thermal = {
Enabled = true
}
}Config.Spotlight = {
Enabled = true,
SyncWithCamera = true,
Brightness = 10.0,
Range = 400.0,
Radius = 10.0,
Color = { 170, 185, 255 }
}Config.POI = {
Enabled = true,
MaxPOIs = 10,
ExpiryTime = 300,
SyncToOthers = true
}Config.Rappel = {
Enabled = true,
Keybind = "G",
MinAltitude = 15,
MaxAltitude = 150,
AllowedSeats = { 1, 2 },
SyncEnabled = true,
AllowedHashes = {},
DisableHashes = {}
}Config.SharedCamera = {
Enabled = true,
SyncIntervalMs = 200,
StateTimeoutMs = 300000,
RestoreTrackedTarget = true,
RestoreGroundLock = true,
RestoreVisionMode = true
}When es_hud is enabled, PolCam hides the normal player HUD while the camera is active:
exports.es_hud:hideHud('polcam')
exports.es_hud:showHud('polcam')The pilot can optionally retain a forced aircraft HUD through:
exports.es_hud:setForceAircraftHud()Example configuration:
Config.EsHud = {
Enabled = true,
AutoDetect = true,
ShowAircraftHudForPilot = false,
FallbackAircraftHud = false
}Agency labels can be selected by vehicle model and livery index.
Config.CameraLabels = {
Enabled = true,
DefaultLabel = "LOS SANTOS POLICE DEPARTMENT",
ModelLabels = {
["polmav"] = "LOS SANTOS POLICE DEPARTMENT",
["maverick"] = "SAN ANDREAS STATE POLICE"
},
LiveryLabels = {
["polmav"] = {
[0] = "LSPD",
[1] = "LSPD AIR-2",
[2] = "VINEWOOD AIR UNIT"
}
}
}| Export | Returns | Purpose |
|---|---|---|
IsPolCamActive() |
boolean |
Whether the camera is active |
GetCurrentTarget() |
entity, table |
Current target entity and metadata |
GetCameraHeading() |
number |
Current camera heading |
IsRappelAvailable() |
boolean |
Whether rappel conditions are satisfied |
IsRappeling() |
boolean |
Whether the player is rappelling |
StartRappel() |
- | Starts a rappel |
ConvertSpeed(speed) |
number |
Converts speed to configured units |
ConvertAltitude(altitude) |
number |
Converts altitude to configured units |
ConvertDistance(distance) |
number |
Converts distance to configured units |
OpenPolCamDebugMenu() |
- | Opens debug tools when enabled |
Example:
local active = exports.polcam:IsPolCamActive()
local target, targetInfo = exports.polcam:GetCurrentTarget()
if active and target then
print(("Tracking entity %s"):format(target))
end| Export | Returns | Purpose |
|---|---|---|
GetActiveAirFeeds() |
table |
Lists active airborne camera feeds |
GetAirFeedById(feedId) |
table |
Returns one feed by identifier |
GetTrackedDatalinkTargets() |
table |
Returns vehicles tracked by active feeds |
Example:
local feeds = exports.polcam:GetActiveAirFeeds()
for _, feed in ipairs(feeds) do
print(json.encode(feed))
endDebug tools are disabled by default.
Config.Debug = {
Enabled = false,
ToolsEnabled = false,
ShowRaycast = true,
ShowDetectionRadius = false,
ShowHitPoint = false,
ShowTargetBox = false,
ShowDebugPanel = false,
LogEvents = false,
LogScans = false
}When enabled, the resource can display raycasts, hit points, target bounds, detection radii and synchronisation state. The F10 debug menu requires es_lib.
Do not leave verbose debug logging enabled on a production server unless it is required for diagnosis.
polcam/
├── client/
│ ├── camera.lua # Camera lifecycle and movement
│ ├── vision.lua # Night and thermal modes
│ ├── targeting.lua # Entity acquisition and tracking
│ ├── spotlight.lua # Searchlight control and sync
│ ├── helicontrol.lua # Hover and orbit assistance
│ ├── poi.lua # Shared world markers
│ ├── rappel.lua # Rappel checks and execution
│ ├── streetoverlay.lua # Location display
│ ├── sounds.lua # Native audio cues
│ ├── debug.lua # Diagnostic tools
│ └── main.lua # Resource orchestration
├── server/
│ └── main.lua # Air feeds, datalink and network state
├── html/
│ ├── index.html # NUI structure
│ ├── style.css # Camera interface
│ └── script.js # NUI behaviour
├── config.lua
└── fxmanifest.lua
The default configuration separates update work into fast, medium and slow intervals. Before lowering intervals:
- Profile the resource with realistic player counts
- Check spotlight and camera synchronisation traffic
- Test several simultaneous air units
- Confirm target scanning does not create avoidable entity-pool work
- Keep debug rendering disabled in production
More frequent synchronisation is not automatically smoother if network latency or client frame time is already the limiting factor.
PolCam uses FiveM's Cerulean resource format and Lua 5.4.
The core resource is not tied directly to QBCore, Qbox or ESX. Server integrations can consume the provided client and server exports.
PolCam has been released publicly as a complete open-source resource. Maintenance and future feature development are best-effort rather than guaranteed.
Forks and pull requests are welcome, particularly where changes remain configurable and do not impose a specific server framework.
When reporting an issue, include:
- FiveM server artefact version
- OneSync configuration
- Helicopter model and seat
- Relevant
config.luavalues - Whether
es_lib,es_hudandnearest-postalare running - Client and server console output
- Reproduction steps
Keep framework-specific behaviour behind configuration or an integration layer.
Cortex PolCam is released under the MIT Licence.
Designed and developed in collaboration with GSD Modifications.
Cortex PolCam is an independent FiveM community resource. It is not affiliated with or endorsed by Rockstar Games, Take-Two Interactive or Cfx.re.
A capable air unit is useful. A configurable one is less troublesome.