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

# Installation

Install Cuxial Emotes step by step: dependencies, start order, optional items and the final check.

Cuxial Emotes needs no SQL import, and its interface ships already built. Install the dependencies, copy the folder and start it in the right order.

{% stepper %}
{% step %}

## Install the dependencies

The resource will not start unless all of these are present and running:

* OneSync enabled on the server
* `ox_lib`
* `oxmysql`
* `cuxial_bridge`

`cuxial_bridge` detects your framework on its own. It supports QBox, QBCore and ESX.

{% hint style="info" %}
`cuxial_diseases` is optional. Only the relations module of the add-on uses it, for its tests and contagion. If it is not running, those features do nothing and everything else works the same.
{% endhint %}
{% endstep %}

{% step %}

## Copy the resource

Place the folder in your `resources` directory and keep its name as `cuxial_emotes`.

{% hint style="danger" %}
Do not rename the folder. Exports and inventory items point to the resource by name (`exports.cuxial_emotes`, `cuxial_emotes.condom_closed`), and renaming it breaks them.
{% endhint %}
{% endstep %}

{% step %}

## Database

Nothing to import. The tables are created when the resource starts, and missing columns are added automatically:

* `cuxial_emotemenu_data`: favorites, sets, walk style, expression, recents and usage per character
* `cuxial_emotes_zones`: emote zones
* `cuxial_emote_reports`: reports sent from the menu
* `cuxial_encounters`: used only by the relations module

`install/emotes.sql` holds the same schema for reference, or to create the tables by hand.
{% endstep %}

{% step %}

## Items (optional add-on only)

Skip this step if you do not use the `cuxial_emotes_dlc` add-on. The item exports always exist, so the inventory never errors, but without the add-on they do nothing.

Add the items to `ox_inventory`:

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

```lua
['condom_box'] = {
    label = 'Condom box',
    weight = 100,
    stack = false,
    close = false,
    consume = 0,
    description = 'A box with several condoms.',
},

['condom_closed'] = {
    label = 'Condom (sealed)',
    weight = 10,
    stack = true,
    close = true,
    description = 'A sealed condom in its original wrapper.',
    server = {
        export = 'cuxial_emotes.condom_closed',
    },
},

['condom_open'] = {
    label = 'Condom (open)',
    weight = 10,
    stack = false,
    close = true,
    description = 'An open condom, ready to use.',
    server = {
        export = 'cuxial_emotes.condom_open',
    },
},

['pregnancy_test'] = {
    label = 'Pregnancy test',
    weight = 20,
    stack = false,
    close = true,
    description = 'A pharmacy pregnancy test.',
    server = {
        export = 'cuxial_emotes.pregnancy_test',
    },
},

['hiv_test'] = {
    label = 'HIV test',
    weight = 20,
    stack = false,
    close = true,
    description = 'Rapid HIV detection test.',
    server = {
        export = 'cuxial_emotes.hiv_test',
    },
},
```

{% endcode %}

Register the box as a container:

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

```lua
setContainerProperties('condom_box', {
    slots = 3,
    maxWeight = 50,
    whitelist = { 'condom_closed', 'condom_open' },
})
```

{% endcode %}

To show the test result and date in the item tooltip, add this to any client script:

```lua
exports.ox_inventory:displayMetadata({
    result = 'Result',
    date = 'Date',
})
```

The full reference, including the metadata each item stores, is in `install/items.md`.
{% endstep %}

{% step %}

## Convars (optional)

Both are optional. Add them to `server.cfg` before the `ensure` lines.

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

```cfg
# Discord webhook that receives the broken emote reports
set cuxial_emotes:report_webhook "https://discord.com/api/webhooks/..."

# 1 = print debug traces to the server and client consoles
setr cuxial_emotes_debug 1
```

{% endcode %}

{% hint style="warning" %}
Declare the webhook with `set`, never `setr`: a replicated convar is sent to every client. The link goes in `server.cfg`, not in `shared/config.lua`. Without it, reports are still saved to the database.
{% endhint %}
{% endstep %}

{% step %}

## Start order

Start the dependencies first and Cuxial Emotes last.

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

```cfg
ensure ox_lib
ensure oxmysql
# your framework and inventory here
ensure cuxial_bridge
# ensure cuxial_diseases     (optional: tests and contagion of the relations module)
# ensure cuxial_emotes_dlc   (only if you have the add-on)
ensure cuxial_emotes
```

{% endcode %}

{% hint style="warning" %}
If you use `cuxial_emotes_dlc`, start it **before** `cuxial_emotes`. While the add-on is installed but not started, zones and relations stay off and the console prints a warning.
{% endhint %}
{% endstep %}

{% step %}

## Check that it works

1. Restart the server and join.
2. Press **F3**. The menu opens.
3. Type `/e adjust`. Your character plays the emote.
4. Press **X** to cancel it.

If something fails, see [Troubleshooting](/scripts/interface/cuxial-emotes/troubleshooting.md).
{% endstep %}
{% endstepper %}

## Sample zones

`install/zones_example.sql` contains one sample emote zone over the Pink Cage motel, on the base map. It is optional. Create your own zones in game with `/emotezones`. Either way, zones need the `cuxial_emotes_dlc` add-on.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/interface/cuxial-emotes/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
