> 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/inventory-and-items/serial-scratcher/installation.md).

# Installation

Install ace\_serialscratch with ox\_inventory.

## Requirements

* [ox\_lib](https://github.com/overextended/ox_lib)
* [ox\_inventory](https://github.com/overextended/ox_inventory)

## Steps

{% stepper %}
{% step %}

### Place the resource

Copy `ace_serialscratch` into your `resources` directory. Don't rename it, because the item exports use the resource name.
{% endstep %}

{% step %}

### Set the start order

Start it **after `ox_lib`** and **before `ox_inventory`**:

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

```properties
ensure ox_lib
ensure ace_serialscratch
ensure ox_inventory
```

{% endcode %}

{% hint style="warning" %}
The bundled `Readme.md` shows `start ace_multipacks` in this example. That's a copy mistake: the correct name is **`ace_serialscratch`**.
{% endhint %}
{% endstep %}

{% step %}

### Add the items

Copy the contents of **`data-for-ox-inv.md`** into `ox_inventory/data/items.lua`:

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

```lua
['halfscratch'] = {
    label = 'Half Serial Scratch',
    weight = 330,
    stack = false,
    close = true,
    allowArmed = true,
    server = {
        export = 'ace_serialscratch.halfscratchserial'
    },
    consume = 1.0
},

['fullscratch'] = {
    label = 'Full Serial Scratch',
    weight = 330,
    stack = false,
    close = true,
    allowArmed = true,
    server = {
        export = 'ace_serialscratch.fullscratchserial'
    },
    consume = 1.0
},

['weaponforensicstool'] = {
    label = 'Forensics Tool',
    weight = 520,
    stack = false,
    close = true,
    allowArmed = true,
    server = {
        export = 'ace_serialscratch.serialnumberforensictool'
    },
    consume = 0.25
},
```

{% endcode %}

`consume = 0.25` means each use of the forensics tool uses up a quarter of the item's durability.
{% endstep %}

{% step %}

### Add the images

Copy `halfscratch.png`, `fullscratch.png` and `weaponforensicstool.png` from `ace_serialscratch/_Images/` into `ox_inventory/web/images/`.
{% endstep %}

{% step %}

### Set your webhook

Put your private Discord webhook in `Config.Settings.webhookURL`, or set `LogActions = false`.
{% endstep %}

{% step %}

### Restart the server

{% endstep %}
{% endstepper %}

## Server exports

The item definitions use these **server** exports. ox\_inventory calls them when the item is used.

| Export                                       | Item                  |
| -------------------------------------------- | --------------------- |
| `ace_serialscratch.halfscratchserial`        | `halfscratch`         |
| `ace_serialscratch.fullscratchserial`        | `fullscratch`         |
| `ace_serialscratch.serialnumberforensictool` | `weaponforensicstool` |

## Spawning items for testing

```
halfscratch
fullscratch
weaponforensicstool
```
