> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/decal-v-graffiti-and-vehicle-sticker/installation.md).

# Installation

{% hint style="info" %}
Coming from v2? Follow [Migrate from v2](/resources/decal-v-graffiti-and-vehicle-sticker/migrate-from-v2.md) instead; it wraps these steps and carries your data and edits over.
{% endhint %}

{% stepper %}
{% step %}

### Install the dependencies

Make sure everything on the [Dependencies](/resources/decal-v-graffiti-and-vehicle-sticker/dependencies.md) page is installed and starting **before** this resource. OneSync must be enabled.
{% endstep %}

{% step %}

### Add both resources

Download the package from [Portal](https://portal.cfx.re/assets/granted-assets), unzip it, and put **both** folders in your server's `resources` directory:

* `rm_decalv`: the script
* `rm_decalv_assets`: decal types (`decals.dat`), streamed textures

{% hint style="danger" %}
Do **not** rename the folders, and do **not** restart `rm_decalv_assets` on a populated server. Its decal types mount when the game level loads, which means they only register for players who **join while it is running**. Start it at boot and leave it alone; restarting `rm_decalv` itself is always safe.
{% endhint %}
{% endstep %}

{% step %}

### Start the resources

Add both to your `server.cfg`, below `oxmysql`, `ox_lib` and your framework so the dependencies are already running:

```cfg
ensure oxmysql
ensure ox_lib
ensure qb-core # your framework

ensure rm_decalv_assets
ensure rm_decalv
```

Keep `rm_decalv_assets` above `rm_decalv`; the script checks for `rm_decalv_assets` at start and warns when it cannot find it. Neither needs to sit at the top of the file: anywhere below the dependencies works, as long as both are running before players connect.
{% endstep %}

{% step %}

### Database

No SQL to run. The tables are created (and older installs migrated) automatically on first start:

* `rm_decalv_stickers`
* `rm_decalv_graffities`
  {% endstep %}

{% step %}

### Items (optional)

Commands work out of the box. If you also want item entry points, set `cfg.disableItems = false` and register the items. Ready-made definitions ship in the resource's `[items]/` folder:

* `items - ox_inventory.lua`: paste into ox\_inventory's `data/items.lua`. The entries route their use through the resource directly, so this works even without a qb/esx bridge.
* `items - qb shared.lua`: paste into qb-core's `shared/items.lua` (bring your own inventory images).
* `items.sql`: run against the ESX `items` table.

The defaults are `paint_spray` (opens the catalog), `scraper` (vehicle clearing mode) and `white_spray` (graffiti clearing). Item names are yours to change in `cfg.items`. Set `cfg.deleteItemInUse = true` to consume the item on use.
{% endstep %}

{% step %}

### Grant admin access

Admins manage the panel, place permanent decals, and bypass zones, limits and ownership checks. Anyone with the ace permission `command` (txAdmin admins) already counts; everyone else goes into `cfg.adminList`:

```lua
cfg.adminList = {
    ['license:0aa00a00a00aa000a000000a00000a00a00aa000'] = true,
    ['XWJ4Q354'] = true, -- citizenid (qb/qbox)
}
```

{% endstep %}

{% step %}

### Configure

Open the catalog in-game with `/decals`. Then head to [Configuration](/resources/decal-v-graffiti-and-vehicle-sticker/configuration.md) to tune permissions, limits and features.

{% hint style="success" %}
The debug overlay (`/decals_debug`, admin-only) tells you at a glance whether the decal types registered, textures resolve and the catalog loaded. Check it first whenever something looks off.
{% endhint %}
{% endstep %}
{% endstepper %}
