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

# INSTALLATION

#### Paso 1 — Colocar el recurso

Copia la carpeta `pv_guidebook` en tu directorio `resources` (recomendado: `resources/[scripts]/[pv]/pv_guidebook`).

#### Paso 2 — Añadir el ensure

En tu `server.cfg`, **después** de `ox_lib` y `oxmysql`:

```cfg
ensure ox_lib
ensure oxmysql
ensure pv_guidebook
```

#### Paso 3 — Base de datos

**Nada que importar manualmente.** Al iniciar, el recurso crea sus tablas automáticamente:

| Tabla                     | Uso                          |
| ------------------------- | ---------------------------- |
| `pv_guidebook_categories` | Categorías del libro         |
| `pv_guidebook_pages`      | Páginas y contenido Markdown |

La primera vez se cargará el contenido de `Config.Seed` como ejemplo. A partir de ahí, todo se edita desde el juego.

#### Paso 4 — Permisos de staff

El ace `guidebook.admin` se **auto-otorga a `group.admin`** al iniciar (sin reiniciar el server). Para dar acceso a otros grupos:

```cfg
add_ace group.mod guidebook.admin allow
```

#### Paso 5 — Personalizar

En `config.lua > Config.UI`:

```lua
Config.UI = {
    title    = 'El Cielo RP',
    subtitle = 'Normativa & Guías',
    logo     = 'https://i.imgur.com/tuLogo.png',   -- opcional
    accent   = '#346ddb',                          -- color de acento
    theme    = 'dark',                             -- 'light' | 'dark'
    allowThemeToggle = true,
}
```

#### Paso 6 — Probar

* Cualquier jugador → `/normas`
* Staff → `/normasadmin` (modo edición)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.privalo.dev/scripts/essentials/guidebook/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
