> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/tactical-and-military/recon-optics/installation.md).

# Installation

Install ace\_reconoptics on your server.

{% stepper %}
{% step %}

### Place the resource

Copy `ace_reconoptics` into your `resources` directory. Keep the folder name, because inventory exports use it.
{% endstep %}

{% step %}

### Add it to `server.cfg`

{% code title="server.cfg" %}

```properties
ensure ace_reconoptics
```

{% endcode %}
{% endstep %}

{% step %}

### Choose commands or items

* **Commands (default):** leave `Config.EnableCommandUse = true`. Players use `/binoculars` and `/spottingscope`.
* **Inventory items:** set up the items with the exports below.
  {% endstep %}
  {% endstepper %}

## Inventory items (optional)

The client exports work with any inventory that can call a client export when an item is used. Item images are in `ace_reconoptics/_images/`.

{% tabs %}
{% tab title="ox\_inventory" %}
Add these items to `ox_inventory/data/items.lua`:

{% code title="ox\_inventory/data/items.lua" %}

```lua
['spottingscope'] = {
    label = 'Spotting Scope',
    weight = 590,
    stack = false,
    consume = 0,
    client = {
        export = 'ace_reconoptics.activateACESpottingScope'
    }
},

['binoculars'] = {
    label = 'Binoculars',
    weight = 200,
    stack = false,
    consume = 0,
    client = {
        export = 'ace_reconoptics.activateACEBinoculars'
    }
},
```

{% endcode %}

Copy `binoculars.png` and `spottingscope.png` from `ace_reconoptics/_images/` to `ox_inventory/web/images/`.
{% endtab %}

{% tab title="Other inventories" %}
Register a usable item in your inventory or framework that calls one of these **client** exports:

```lua
exports['ace_reconoptics']:activateACEBinoculars()
exports['ace_reconoptics']:activateACESpottingScope()
```

How you register a usable item depends on your inventory. See its documentation.
{% endtab %}
{% endtabs %}
