Security Cameras

17€

With this script, you'll be able to view and place CCTV cameras everywhere you want !


✅ View image as if you were controlling the camera
✅ Multiple locations with groups of cameras
✅ Whitelist some users per location
✅ Custom or default name for each camera
✅ Camera movement via the mouse
✅ Zoom in / out
✅ Tool to easily place cameras
✅ LSPD cameras already placed
✅ Bank cameras already placed
✅ Night vision
✅ Thermal vision
✅ Break / repair camera (example in Custom/Client/break_repair.lua, remove file to disable functionality)
✅ Disable zooming per camera
✅ Disable pan/tilt per camera
Screenshot-basic support
✅ Uses RegisterKeyMapping so users can modify their keybinds
✅ Standalone
✅ Compatible with ESX and QB-Core
✅ Can be configured to work with any other framework
⚠️ Uses FiveM Asset Escrow system

1.1.4

✅ Update whitelist to latest ESX


1.1.3b

✅ Add job grade permission support
✅ Add ACE permission support


1.1.3a

✅ Bugfix whitelist


1.1.3

✅ Ability to disable zooming per camera
✅ Ability to disable pan/tilt per camera
✅ Ability to break / repair camera (example in Custom/Client/break_repair.lua, remove file to disable functionality)


1.1.2b

✅ Bugfix debug mode


1.1.2a

✅ Bugfix camera menu 2 (some users had compatibility issues)


1.1.1

✅ Bugfix camera menu


1.1.0

✅ Add Screenshot-basic support (configure URL per location, delete ScreenShot if you don't want it)
✅ Commands now use the RegisterKeyMapping native (still configurable, but can now be configured by each user individually)


1.0.2

✅ Add version check


1.0.1

✅ Night vision (can be disabled per location in the config file)
✅ Thermal vision (can be disabled per location in the config file)


1.0.0

✅ Add access points
✅ Whitelist some people to have access to a list of cameras (per location)
✅ Custom name to each camera
✅ Default name for all of them
✅ Camera movement via the mouse only
✅ Scrolling allows you to zoom in and out
✅ Tool to easily place cameras
✅ LSPD cameras already placed
✅ Bank cameras already placed
✅ Standalone
✅ Compatible with ESX
✅ Can be configured to work with any other framework


Nabla.LogLevel = Nabla.LogLevels.WARN -- Log levels are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (default is WARN)

Config = {

  -- Please check our FAQ if you have any question : https://fivem.nabla-corporation.com/faq

  -- If debug is enabled you'll be able to place the cameras while in game
  Debug = false,
  -- Controls while in debug mode :
  -- F10   : Enable /disable flying mode
  -- W / S : move forward / backward
  -- Mouse : change direction
  -- Shift : Increase speed
  -- Ctrl  : Decrease speed
  -- Enter : Print current location and rotation
  -- To easily copy and paste the location, you can open the log file in FiveM\FiveM.app\logs\CitizenFX_log_YEAR_MONTH_XXX.log (open the latest one)

  -- Strings to be displayed to the player
  Strings = {
    ['View_Cameras'] = '~INPUT_3525B41C~ to view cameras',
    ['DefaultCam']   = 'CCTV',
    ['CCTV_Menu1']   = '~INPUT_FC40A44E~ %s (%d/%d) ~INPUT_E98B2268~\n',
    ['CCTV_Menu2']   = '~INPUT_7028F2DA~ Vision mode\n ~INPUT_95162F4D~ Save image\n',
    ['CCTV_Menu3']   = '~INPUT_A65B60E7~ Quit\n',
    ['Saving']       = 'Sending image...',
    ['Saved']        = 'Image ~g~sent',
  },

  -- Distance to show markers, help text...
  DrawMarkerDistance = 50.0,
  DrawTextDistance   =  1.0,

  -- Function for drawing markers
  DrawMarker = function(pos)
    DrawMarker(2, pos.x, pos.y, pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, .5, .5, .5, 255, 176, 39, 100, false, true, 2, true, false, false, false)
  end,

  -- How fast the camera can move :
  Incr = {
    Pan  = 5.0, --  Left / Right
    Tilt = 5.0, --  Up   / Down
    Fov  = 2.5, --  In   / Out
  },

  -- Keybinds, you can choose from here : https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/
  DefaultControls = function()
    RegisterKeyMapping('+cctv_menu',     'CCTV - Menu',            'KEYBOARD',               'E') -- Open the menu
    RegisterKeyMapping('+cctv_previous', 'CCTV - Previous Camera', 'KEYBOARD',            'LEFT') -- Switch to the previous camera
    RegisterKeyMapping('+cctv_next',     'CCTV - Next Camera',     'KEYBOARD',           'RIGHT') -- Switch to the next     camera
    RegisterKeyMapping('+cctv_exit',     'CCTV - Exit Menu',       'KEYBOARD',            'BACK') -- Stop displaying the cameras
    RegisterKeyMapping('+cctv_screen',   'CCTV - Save image',      'MOUSE_BUTTON', 'MOUSE_RIGHT') -- Take a screenshot (requires screenshot-basic)
    RegisterKeyMapping('+cctv_vision',   'CCTV - Vision Mode',     'MOUSE_BUTTON',  'MOUSE_LEFT') -- Cycle through the visions mode
  end,

  DelayScreen = 5, -- Number of seconds between two screens

  -- Minimum and maximum fov (zoom)
  MaxFov = 80.0,
  MinFov = 2.0,

  -- List of all the locations and the cameras associated to it
  Locations = {
    -- Police station
    ['police1'] = {

      -- List of players who have access to this location, set WhiteListEnabled = true/false to enable/disable the whitelist
      WhiteListEnabled = false,
      WhiteList = {
        'ip:192.168.168.35',
        'steam:12345',
        'police',
        'police:2', -- Job and Grade
        'nabla.cctv_police1', -- To use with ACE, add this to your server.cfg : add_ace identifier.YOURIDENTIFIER nabla.cctv_police1 allow
      },

      ScreenShot = {
        url = 'https://discord.com/api/webhooks/YOURWEBHOOK',
        data = 'files[]',
      },

      -- Set vision parameters
      Vision = {
        Night   = true, -- Enable night   vision ?
        Thermal = true, -- Enable thermal vision ?
      },

      -- Coordinate for the entry point(s)
      Enter = {
        vector3(440.47, -975.72, 30.68),
      },

      -- List of cameras available at this location
      Cameras = {
        -- x,y,z    Position of the camera
        -- rx,ry,rz Orientation of the camera : rx is up/down / ry is the roll (often 0) / rz is the heading
        -- zoom     Ability to zoom (default to true)
        -- move     Ability to pan/tilt (default to true)
        -- working  Boolean to enable the camera (default to true) see Custom/Client/break_repair.lua for an example of usage
        -- label    Name of the camera displayed in the top left corner. It is optional, if not provided, it will be replaced by the string associated to DefaultCam
        {x = 441.81, y =  -988.10, z = 32.56, rx = -11.50, ry = 0.0, rz =   50.0,  label = 'Main entrance', move = false, working = false},
        {x = 489.44, y = -1004.08, z = 30.02, rx =  -5.71, ry = 0.0, rz =  -15.21, label = 'Back street', zoom = false},
        {x = 438.87, y =  -978.61, z = 32.83, rx = -15.83, ry = 0.0, rz = -135.24},
        {x = 449.40, y =  -988.65, z = 32.91, rx = -10.94, ry = 0.0, rz =   56.89},
        {x = 449.41, y =  -981.67, z = 32.90, rx = -13.14, ry = 0.0, rz =  129.71},
        {x = 459.11, y =  -986.26, z = 28.56, rx = -14.15, ry = 0.0, rz =   83.11},
        {x = 465.15, y =  -985.29, z = 27.84, rx = -20.58, ry = 0.0, rz =  154.54},
        {x = 458.97, y =  -987.42, z = 27.82, rx = -24.50, ry = 0.0, rz = -133.60},
        {x = 462.34, y = -1007.90, z = 26.69, rx = -15.97, ry = 0.0, rz =  -16.28},
        {x = 469.49, y = -1009.05, z = 27.90, rx = -12.00, ry = 0.0, rz =  168.99},
        {x = 482.14, y =  -978.34, z = 30.33, rx = -17.72, ry = 0.0, rz =   39.28},
        {x = 433.56, y =  -978.18, z = 33.24, rx = -16.12, ry = 0.0, rz =  128.38},
        {x = 424.22, y =  -996.71, z = 33.96, rx = -16.82, ry = 0.0, rz =  128.22},
        {x = 438.28, y =  -999.63, z = 32.72, rx =  -7.16, ry = 0.0, rz = -140.59},
      }
    },

    -- Bank
    ['bank1'] = {
      WhiteListEnabled = false,
      WhiteList = {
        'banker', -- Job
        'banker:2', -- Job and Grade
        'nabla.cctv_bank1', -- To use with ACE, add this to your server.cfg : add_ace identifier.YOURIDENTIFIER nabla.cctv_bank1 allow
      },
      Vision = {
        Night   = true,
        Thermal = false,
      },
      ScreenShot = {
        url = 'https://discord.com/api/webhooks/YOURWEBHOOK',
        data = 'files[]',
      },
      Enter = {
        vector3(251.0134, 227.6369, 106.2869),
      },
      Cameras = {
        {x = 241.70, y = 214.74, z = 108.53, rx =  -8.41, ry = 0.0, rz =  -78.06},
        {x = 255.47, y = 205.78, z = 108.60, rx = -12.64, ry = 0.0, rz =   27.70},
        {x = 255.14, y = 205.70, z = 113.87, rx = -28.26, ry = 0.0, rz =   25.53},
        {x = 235.40, y = 227.65, z = 113.92, rx = -27.20, ry = 0.0, rz = -156.31},
        {x = 269.70, y = 223.65, z = 114.59, rx = -34.19, ry = 0.0, rz =  108.99},
        {x = 269.73, y = 223.64, z = 108.35, rx = -33.32, ry = 0.0, rz =   92.48},
        {x = 251.99, y = 225.42, z = 104.57, rx = -38.94, ry = 0.0, rz =  -96.57},
        {x = 263.11, y = 206.06, z = 108.56, rx = -31.90, ry = 0.0, rz =  106.63},
        {x = 266.77, y = 215.92, z = 108.57, rx = -23.33, ry = 0.0, rz =  129.44},
      }
    },
  }
}

function DisplayHelpText(lineOne, lineTwo, lineThree)
  BeginTextCommandDisplayHelp("THREESTRINGS")
  AddTextComponentSubstringPlayerName(lineOne)
  AddTextComponentSubstringPlayerName(lineTwo or "")
  AddTextComponentSubstringPlayerName(lineThree or "")
  EndTextCommandDisplayHelp(0, 0, 1, -1)
end

local prev = nil
function ShowNotification(message)
  if prev ~= nil then
    RemoveNotification(prev)
  end
  AddTextEntry(GetCurrentResourceName().."Notif", Config.Strings[message])
  BeginTextCommandThefeedPost(GetCurrentResourceName().."Notif")
  prev = EndTextCommandThefeedPostTicker(false, false)
end


-- Fill the the config using the template
for loc,data in pairs(Config.Locations) do
  for k,cam_conf in pairs(data.Cameras) do
    local template = {
      x  = 0.0, y  = 0.0, z  = 0.0,
      rx = 0.0, ry = 0.0, rz = 0.0,
      move = true, zoom = true, working = true,
      fov = (Config.MaxFov + Config.MinFov)/2, label = Config.Strings['DefaultCam']
    }
    for k3,v3 in pairs(cam_conf) do
      template[k3] = v3
    end
    Config.Locations[loc].Cameras[k] = template
  end
end
Keybind / Command Action
EOpen the CCTV menu (At the marker in the police station for instance)
Previous camera
Next camera
MouseMove the camera
ScrollZoom in/out
BackspaceExit Menu
Right ClickTake a screenshot (requires screenshot-basic)
Left ClickCycle through the visions mode (Day, Night, Thermal)
5
  • 2
  • 0
  • 0
  • 0
  • 0
  • jxck

    3/5/2022

    Like: The support team rapidly respond to any issues or queries as well as pushing out requested updates extremely fast.
    Dislike: Nothing.

  • OhMcGawGaming

    21/4/2022

    Like : Adds incredible amount of RP able to secure areas with CCTV bad take stills from them to use as evidence
    Dislike : nothing