Page cover

📹CCTV locations

Easily add more CCTV locations via Config.Locations

  • The key is the location name and must be unique

  • The name in the zone table is the zone name and must be unique

  • The zone coords must be vector3

  • The zone size must be vector3


  • The key is the location name and must be unique

['My Custom CCTV Location'] = { -- the key is the location name

},

  • The name is the zone name for this location and must be unique

  • To enable this zone set enabled to true

  • To visually debug the zone location set debug to true

  • The coords must be vector3

  • The radius is the size of the target zone

  • The size must be vector3 it is recommended to set the zone size slightly larger than the building location as this is what will determine when players are inside to spawn the CCTV props

  • The heading is the zone heading

['My Custom CCTV Location'] = { -- the key is the location name
    zone = { -- zone settings
        name = 'customlocation1', -- zone name must be unique no spaces or anything just one word
        enabled = true, -- enable this loction
        debug = false, -- enable zone debug if ped is disabled
        coords = vector3(-542.5, -197.15, 38.24), -- target coords must be vector3
        radius = 0.75, -- radius of target zone
        size = vector3(50, 50, 50), -- zone size for spawning camera objects when inside
        heading = 30.86, -- zone heading
    },
    ---
},

  • Icon is the target icon

  • Label is the target label

  • Distance is the target distance do not set this higher than Config.Security.MaxDistance

['My Custom CCTV Location'] = { -- the key is the location name
    ---
    target = { -- ped settings
        icon = 'fa-solid fa-video', -- target icon
        label = 'View CCTV', -- target label
        distance = 3.0, -- target distance
    },
    ---
},

  • Locations can be job locked if requried with a minimum rank required to use the CCTV

  • To enable a job requirement set enabled to true

  • Then define the job names and required rank in the name table ensure these are in your jobs.lua

['My Custom CCTV Location'] = { -- the key is the location name
    ---
    job = { -- job settings
        required = true, -- require a job to use this location
        name = { -- job names and their ranks required to view cctv
            my_custom_job = 1,
            --add more jobs and ranks as required
        },
    },
    ---
},

  • The name is the camera name in the CCTV menu

  • The cooords must be a vector4 value this is for the camera view location

  • The model is the model name if you wish to spawn a physical prop at this camera location (set to nil for nothing)

  • The location must be a vector4 value this is for the CCTV camera prop location (set to nil for nothing)

  • Night is the variable for night vision at this location

  • Thermal is the variable for thermal vision at this location

['My Custom CCTV Location'] = { -- the key is the location name
    ---
    cameras = { -- camera settings
        {
            name = 'Custom Camera 1', -- camera name
            coords = vector4(-553.42, -190.04, 44.71, 211.62), -- camera coords
            model = 'm24_1_prop_m24_1_carrier_bank_cctv_01', -- camera model to spawn
            location = vector4(-553.41, -189.74, 44.85, 212.07), -- camera model coords
            night = true, -- enable night vision at this camera
            thermal = true, -- enable thermal vision at this camera
        },
        {
            name = 'Custom Camera 2', -- camera name
            coords = vector4(-567.04, -204.49, 42.6, 120.54), -- camera coords
            model = nil, -- camera model to spawn 
            location = nil, -- camera model coords
            night = false, -- enable night vision at this camera
            thermal = false, -- enable thermal vision at this camera
        },
        --add more cctv locations as required
    },
},

  • Below is what a finished config entry should look like for a custom location

['My Custom CCTV Location'] = { -- the key is the location name
    zone = { -- zone settings
        name = 'customlocation1', -- zone name must be unique no spaces or anything just one word
        enabled = true, -- enable this loction
        debug = false, -- enable zone debug if ped is disabled
        coords = vector3(-542.5, -197.15, 38.24), -- target coords must be vector3
        radius = 0.75, -- radius of target zone
        size = vector3(50, 50, 50), -- zone size for spawning camera objects when inside
        heading = 30.86, -- zone heading
    },
    target = { -- ped settings
        icon = 'fa-solid fa-video', -- target icon
        label = 'View CCTV', -- target label
        distance = 3.0, -- target distance
    },
    job = { -- job settings
        required = false, -- require a job to use this location
        name = { -- job names and their ranks required to view cctv
            my_custom_job = 1,
            --add more jobs and ranks as required
        },
    },
    cameras = { -- camera settings
        {
            name = 'Custom Camera 1', -- camera name
            coords = vector4(-553.42, -190.04, 44.71, 211.62), -- camera coords
            model = 'm24_1_prop_m24_1_carrier_bank_cctv_01', -- camera model to spawn
            location = vector4(-553.41, -189.74, 44.85, 212.07), -- camera model coords
            night = true, -- enable night vision at this camera
            thermal = true, -- enable thermal vision at this camera
        },
        {
            name = 'Custom Camera 2', -- camera name
            coords = vector4(-567.04, -204.49, 42.6, 120.54), -- camera coords
            model = nil, -- camera model to spawn 
            location = nil, -- camera model coords
            night = false, -- enable night vision at this camera
            thermal = false, -- enable thermal vision at this camera
        },
        --add more cctv locations as required
    },
},

Last updated