Docs /Foltone CCTV/Configuration
v1.1.0

Configuration — foltone_cctv

All configuration is in the config.lua file.

Framework & Locale

Config.Framework = "esx"       -- "esx", "qbcore" or "qbx"
Config.Locale = "en"           -- "en" or "fr"
Config.InteractionType = "ox_target" -- "ox_target", "drawtext" or "marker"
Config.Debug = false
ParameterTypeDescription
FrameworkstringServer framework
LocalestringLanguage for notifications and UI
InteractionTypestringInteraction method for NPCs and stations
DebugbooleanEnable debug prints in console

Items

Config.TabletItem = "cctv_tablet"
Config.StationItem = "cctv_station"
Config.StationProp = "prop_cctv_unit_01"
ParameterTypeDescription
TabletItemstringInventory item name for the tablet
StationItemstringInventory item name for the monitoring station
StationPropstringGTA prop model for fixed station objects

Shop Accessories

Config.ShopAccessories = {
    {
        id = "tablet",
        item = "cctv_tablet",
        label = "CCTV Tablet",
        image = "tablet.png",
        description = "Portable tablet to check your cameras remotely.",
        specs = { "PORTABLE", "WIRELESS" },
        price = 2000,
    },
    {
        id = "station",
        item = "cctv_station",
        label = "CCTV Monitor",
        image = "station.png",
        description = "Fixed control station to monitor all your cameras.",
        specs = { "HD SCREEN", "MULTI-CAM" },
        price = 5000,
    },
}

Accessories are displayed alongside cameras in the shop. The station item can be placed in the world using the item.

Camera types

Config.MaxCamerasPerPlayer = 10
Config.PlacementDistance = 8.0
ParameterTypeDescription
MaxCamerasPerPlayernumberMaximum cameras a player can place
PlacementDistancenumberMaximum distance (meters) to place a camera

Camera type structure

Each entry in Config.CameraTypes defines a camera model:

{
    id = "standard",
    item = "cctv_cam_standard",
    label = "Standard",
    image = "standard.png",
    description = "Classic wall camera. Reliable and discreet.",
    specs = { "FOV 70", "ZOOM x4", "60 FPS" },
    prop = "prop_cctv_cam_03a",
    price = 3000,
    wallOffset = 0.0,
    offset = {
        pos = vector3(0.45, 0.37, 0.35),
        pitch = 1.3,
        yaw = -56.3,
        propPitch = 0.0,
        propRoll = 0.0,
        propYaw = 170.0,
    },
    fov = { default = 70.0, min = 25.0, max = 100.0 },
    zoomStep = 5.0,
    rotationSpeed = 2.0,
    maxVertAngle = 60.0,
},
ParameterTypeDescription
idstringUnique identifier (stored in database)
itemstringInventory item name for this camera type
labelstringDisplay name in the shop UI
descriptionstringDescription shown in the shop UI
specstableArray of spec badges shown in the shop (e.g. “FOV 70”)
propstringGTA prop model name
pricenumberPurchase price from the shop
imagestringPNG image filename in client/nui/img/ for shop display
wallOffsetnumberDistance offset from the wall surface
offset.posvector3Camera view position offset (forward, left, up) relative to the prop
offset.pitchnumberCamera view pitch offset (degrees)
offset.yawnumberCamera view yaw offset (degrees)
offset.propPitchnumberProp pitch rotation correction (degrees)
offset.propRollnumberProp roll rotation correction (degrees)
offset.propYawnumberProp rotation offset relative to camera view direction (degrees)
fov.defaultnumberDefault field of view (degrees)
fov.minnumberMinimum FOV when zoomed in
fov.maxnumberMaximum FOV when zoomed out
zoomStepnumberFOV change per scroll step
rotationSpeednumberMouse sensitivity for camera rotation
maxVertAnglenumberMaximum vertical rotation angle (degrees)

Default camera types

IDPropPriceFOVDescription
standardprop_cctv_cam_03a$3,00070Classic wall camera
bulletprop_cctv_cam_04b$4,00055Long-range with powerful zoom
mini_bullethei_prop_bank_cctv_02$3,50055Compact and discreet
shop_camm24_1_prop_m24_1_carrier_bank_cctv_01$8,00060Shop camera with PTZ 360

Calibrating offsets

Use the in-game debug command to calibrate camera offsets:

/cctv_debug
  1. Approach a placed camera (< 15m)
  2. Run the command — enters debug camera view
  3. Adjust with controls:
    • Mouse — pitch / yaw offset
    • Scroll — prop yaw rotation
    • Arrow keys — position offset (forward/back/left/right)
    • E / Q — position offset (up/down)
    • Backspace — exit and print values
  4. Copy the printed values into Config.CameraTypes[x].offset

Permissions

Config.AllowedJobs = {
    "police",
    "ambulance",
}
ParameterTypeDescription
AllowedJobstableJobs allowed to place cameras. Empty table = everyone can place

Motion detection

Config.MotionDetection = {
    Radius = 15.0,
    Cooldown = 60,
    Default = true,
}
ParameterTypeDescription
RadiusnumberDetection radius in meters
CooldownnumberSeconds between alerts for the same camera
DefaultbooleanWhether new cameras have motion detection enabled by default

Destruction

Config.DestructionHits = 3

Config.DestructionWeapons = {
    "WEAPON_CROWBAR",
    "WEAPON_PISTOL",
    -- ...
}
ParameterTypeDescription
DestructionHitsnumberNumber of hits/shots required to destroy a camera
DestructionWeaponstableList of weapon hashes that can damage cameras

Camera visual effects

Config.CameraEffect = {
    timecycle = "CAMERA_secuirity",
    strength = 0.6,
    vignette = 1.0,
    grain = 1.0,
    scanline = 1.0,
}
ParameterTypeDescription
timecyclestringGTA timecycle modifier name
strengthnumberTimecycle intensity (0.0 = off, 1.0 = max)
vignettenumberScreen vignette intensity (0.0 = off, 1.0 = max)
grainnumberFilm grain intensity (0.0 = off, 1.0 = max)
scanlinenumberScanline effect intensity (0.0 = off, 1.0 = max)

Available timecycles: CAMERA_secuirity (default), CAMERA_BW (black & white), NG_filmic08 (cinematic), phone_cam3 (webcam look).

Captures

Config.MaxCaptures = 20

Maximum number of screenshots saved per player. When exceeded, the oldest capture is automatically deleted.

Requires screenshot-basic and set screenshot_basic_allow_fs_write "true" in server.cfg.

Shop PED

Config.Ped = {
    model = "s_m_y_ammucity_01",
    scenario = "WORLD_HUMAN_STAND_IMPATIENT",
}
ParameterTypeDescription
modelstringPED model name for the shop vendor
scenariostringPED idle animation scenario

Shop positions

Config.ShopPositions = {
    {
        pos = vector3(72.25, -1399.10, 29.38),
        heading = 270.0,
        blip = {
            sprite = 689,
            color = 3,
            scale = 0.7,
            label = "Security Shop",
        },
    },
}
ParameterTypeDescription
posvector3PED spawn position
headingnumberPED facing direction
blip.spritenumberMap blip sprite ID
blip.colornumberMap blip color ID
blip.scalenumberMap blip size
blip.labelstringMap blip label text

Computer positions

Config.ComputerPositions = {
    {
        pos = vector3(441.81, -982.08, 30.69),
        heading = 0.0,
        label = "computer_label",
    },
}

Fixed computer terminals that open the camera panel (no prop spawned, zone-based interaction).

Station positions

Config.StationPositions = {
    {
        pos = vector3(441.81, -982.08, 30.69),
        heading = 0.0,
    },
}

Fixed monitoring stations with prop_cctv_unit_01 prop spawned. Same functionality as tablets.

Interaction

Config.InteractionDistance = 2.5

Config.Marker = {
    type = 1,
    scale = vector3(1.0, 1.0, 0.5),
    color = { r = 59, g = 130, b = 246, a = 120 },
}
ParameterTypeDescription
InteractionDistancenumberDistance to trigger interaction (drawtext/marker modes)
Marker.typenumberGTA marker type (1 = cylinder)
Marker.scalevector3Marker dimensions
Marker.colortableRGBA color of the marker

Notifications

function ClientNotification(message, type)
    exports['ox_inventory']:Notification(message)
end

Override this function in config.lua to use your own notification system. The server triggers the client event foltone_cctv:notify which calls this function.