> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/laptop-pack/cameras/installation/cam-settings.md).

# Cam Settings

{% hint style="info" %}
The code for camera items and settings can be found in av\_cameras/server/editable/\_cameras.lua
{% endhint %}

{% code title="" %}

```lua
Config.CameraItems = {
    ['gopro'] = { -- item name
        canUse = function(playerId) -- add yourn own check to allow player to use this item
            return true -- return true or false
        end,
        -- if true, camera will be marked as technician placed and marked as unassigned in the cameras list
        technician = false,
        settings = {
            modelsList = { 'prop_spycam' }, -- list of camera models, player will be able to choose between them when installing the cameras
            -- Functionality Settings
            expiration = 48, -- in hours, after this time camera will stop working, set to false to disable
            plugged = false, -- if true, cam will be plugged into power source and won't require battery
            rotationAngle = 90, -- 0-360
            -- Vision Modes
            hasNightVision = true,
            hasThermalVision = false,
            -- Features
            allowZoom = true,
            allowVehicleInstall = true,
            allowHacking = true,
            motionDetection = true,
            -- Durability & Damage
            isBreakable = true, -- will break on weapon damage
            damageChance = nil, -- chance in % that cam gets randomly damaged, for technician RP purposes, set to nil to disable
        },
    },
}
```

{% endcode %}

Each camera item must include the following fields to be properly registered on the server:

* **item name** (`string`): The index key. It must be unique and perfectly match the item name registered in your inventory system.
* **canUse** `function(playerId)`: A function that determines if a player can use the item. It must return `true` to allow usage or `false` to block it. You can inject your custom logic or checks here.
* **technician** (`boolean`): If set to `true`, the camera will be marked as "unassigned" upon installation. It will not have an owner until a technician manually links it to a player.
* **settings** (`table`): Contains the specific configuration parameters for the camera:
  * **modelsList** (`table`): An array containing the available prop models that can be spawned for this camera.
  * **expiration** (`number` | `false`): The time (in hours) before the camera expires and is automatically removed. Set to `false` to disable expiration.
  * **plugged** (`boolean`): If `true`, the camera acts as a hardwired device and will not consume battery life.
  * **rotationAngle** (`number`): The maximum rotation angle or field of view for the camera, ranging from `0` to `360`.
  * **hasNightVision** (`boolean`): Enables night vision capabilities when monitoring this camera.
  * **hasThermalVision** (`boolean`): Enables thermal vision capabilities when monitoring this camera.
  * **allowZoom** (`boolean`): Allows the user to zoom in and out while monitoring.
  * **allowVehicleInstall** (`boolean`): Permits the camera to be installed on or inside vehicles.
  * **allowHacking** (`boolean`): Allows the camera to be compromised. *Note: This feature is only available through the Hacker App (currently in development).*
  * **motionDetection** (`boolean`): Enables motion alerts. If the camera detects movement from anyone other than the assigned owner, an alert is sent to the owner.
  * **isBreakable** (`boolean`): Makes the camera vulnerable to physical damage, allowing users to destroy it using weapons.
  * **damageChance** (`number` | `nil`): The percentage chance (e.g., `10` for 10%) that the camera will suffer random hardware damage, ideal for Technician RP scenarios. Set to `nil` to disable random damage.
  * **replay** (`boolean`): Allows the camera to record activity even when not actively being monitored, enabling video playback features. *Recommendation: It is highly recommended to place these cameras outdoors, as certain interior environments may cause issues when utilizing this feature.*
