> 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/es/vehiculos/cuxial-chipeo/installation.md).

# Instalación

Instala Cuxial Chipeo paso a paso: dependencias, ítems, props de los altavoces, permiso de staff y orden de arranque.

Cuxial Chipeo no necesita importar ningún SQL. Crea sus tablas en el primer arranque. Sí necesita sus ítems en tu inventario.

{% stepper %}
{% step %}

## Comprueba las dependencias

Tienen que estar instaladas y funcionando antes:

* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, con un framework compatible
* OneSync activado en el servidor
* `ox_inventory`, para los ítems
* Un target compatible con Cuxial Bridge (`sleepless_interact`, `ox_target` o `qb-target`), para los altavoces portátiles
  {% endstep %}

{% step %}

## Copia el recurso

Coloca la carpeta `cuxial_chipeo` dentro de tu directorio `resources`. No le cambies el nombre: los ítems llaman al recurso por ese nombre.
{% endstep %}

{% step %}

## Añade los ítems

El archivo `install/items.lua` trae todos los ítems listos para `ox_inventory`. Pega sus entradas dentro de la tabla `return { ... }` de `ox_inventory/data/items.lua`. La línea `export` es la que hace que cada ítem se pueda usar.

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

```lua
-- Equipo
['chipeo_radio'] = {
    label = 'Car Audio System',
    weight = 3000,
    stack = false,
    close = true,
    description = 'Sound system ready to install in a vehicle',
    client = { export = 'cuxial_chipeo.chipeo_radio' },
},
['chipeo_unmount'] = {
    label = 'Audio Removal Kit',
    weight = 500,
    stack = false,
    close = true,
    description = 'Removes the sound system from a vehicle',
    client = { export = 'cuxial_chipeo.chipeo_unmount' },
},

-- Memorias USB (el número es cuántas canciones caben)
['usb_8']   = { label = 'USB Drive 8 GB',   weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_8' } },
['usb_16']  = { label = 'USB Drive 16 GB',  weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_16' } },
['usb_32']  = { label = 'USB Drive 32 GB',  weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_32' } },
['usb_64']  = { label = 'USB Drive 64 GB',  weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_64' } },
['usb_128'] = { label = 'USB Drive 128 GB', weight = 50, stack = false, close = true, client = { export = 'cuxial_chipeo.usb_128' } },

-- Materiales de reparación (mechanic.requirements)
['chipeo_amp']       = { label = 'Amplifier',     weight = 1000, stack = true, close = true },
['chipeo_crossover'] = { label = 'Crossover',     weight = 300,  stack = true, close = true },
['chipeo_cables']    = { label = 'Audio Cables',  weight = 200,  stack = true, close = true },
['chipeo_battery']   = { label = 'Audio Battery', weight = 1000, stack = true, close = true },

-- Altavoz portátil: un ítem por cada entrada de items.medusas
-- ['my_speaker'] = {
--     label = 'Portable Speaker',
--     weight = 2000,
--     stack = false,
--     close = true,
--     client = { export = 'cuxial_chipeo.my_speaker' },
-- },
```

{% endcode %}

Reglas a tener en cuenta:

* El export es siempre `cuxial_chipeo.<nombre del ítem>`, y el nombre del ítem tiene que coincidir con el de `shared/config.lua` (`items.install`, `items.unmount`, las claves de `items.usb` y las claves de `items.medusas`).
* Las memorias USB no pueden apilarse. Cada una lleva sus canciones en sus metadatos.
* Añade un ítem por cada entrada que pongas en `items.medusas`, siguiendo el ejemplo comentado del final.
* Los materiales de reparación son ítems normales. No llevan export.

{% hint style="info" %}
Los nombres visibles, los pesos y las imágenes los eliges tú. El paquete no incluye imágenes de ítems.
{% endhint %}
{% endstep %}

{% step %}

## Aporta los props de los altavoces

El recurso no carga ningún modelo. Cada entrada de `items.medusas` en `shared/config.lua` asocia un ítem con el nombre de un prop, y ese prop tiene que existir ya en tu servidor.

La lista viene vacía, así que no hay altavoces portátiles hasta que añadas uno. Añade una entrada por cada altavoz cuyo prop tengas y crea su ítem.
{% endstep %}

{% step %}

## Define el permiso de staff

Las acciones de staff usan el permiso del framework indicado en `admin.permission` de `shared/config.lua`, `'admin'` por defecto, comprobado a través de Cuxial Bridge. Cambia el valor si tu staff usa otro permiso.

El detalle está en [Comandos y permisos](/scripts/es/vehiculos/cuxial-chipeo/commands.md#permisos).
{% endstep %}

{% step %}

## Arranca el recurso

Arráncalo después de sus dependencias, de tu framework, del inventario y del target:

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

```cfg
ensure oxmysql
ensure ox_lib
# tu framework aquí
ensure ox_inventory
# tu target aquí
ensure cuxial_bridge
ensure cuxial_chipeo
```

{% endcode %}

Opcional: el idioma sigue la convar `ox:locale`. Se incluyen `en` y `es`.

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

```cfg
setr ox:locale "es"
```

{% endcode %}

No hay SQL que ejecutar. Al arrancar, el recurso crea `chipeo_installs`, `chipeo_vehicle_damage`, `chipeo_vehicle_usb`, `chipeo_playlists` y `chipeo_eq_presets`, y muestra en consola cuántos equipos instalados ha cargado.
{% endstep %}

{% step %}

## Comprueba que funciona

1. Date un `chipeo_radio` y un `usb_8`.
2. Ponte junto a un vehículo y usa `chipeo_radio`. Corre una barra de progreso y el equipo queda instalado.
3. Sube y pulsa <kbd>F4</kbd>. Se abre la radio.
4. Pega un enlace directo `https://` a un archivo de audio (por ejemplo, uno que acabe en `.mp3`) y dale a reproducir. Baja del coche: la música se sigue oyendo alrededor.
5. Usa el `usb_8` estando dentro. Abre la pestaña de biblioteca y guarda una canción en el USB.
   {% endstep %}
   {% endstepper %}

Siguiente: ajusta el script a tu servidor en [Configuración](/scripts/es/vehiculos/cuxial-chipeo/configuration.md).


---

# 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/es/vehiculos/cuxial-chipeo/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.
