> 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/dj/exports.md).

# EXPORTS

#### 4.1 Bridge editable

El acceso a job y admin se resuelve en `bridge/server.lua` y `bridge/client.lua` (ambos en `escrow_ignore`, **editables sin desencriptar**):

```lua
-- bridge/server.lua
function PV_IsAdmin(src)
    -- ejemplo: staff del trabajo 'admin' de qbx
    if GetResourceState('qbx_core') == 'started' then
        local p = exports.qbx_core:GetPlayer(src)
        if p and p.PlayerData.job.name == 'admin' then return true end
    end
    return IsPlayerAceAllowed(src, Config.AdminAce)
end
```

#### 4.2 Exports

**Servidor**

| Export                        | Descripción                                               |
| ----------------------------- | --------------------------------------------------------- |
| `exports.pv_dj:GetStations()` | Tabla `{ [id] = station }` con todas las mesas cargadas   |
| `exports.pv_dj:GetState(id)`  | Snapshot completo `{ A, B, master, cross, playlist, fx }` |
| `exports.pv_dj:IsAdmin(src)`  | Bool. Igual que `PV_IsAdmin`                              |

**Cliente**

| Export                           | Descripción                  |
| -------------------------------- | ---------------------------- |
| `exports.pv_dj:Open(id)`         | Abre la NUI de la mesa `id`  |
| `exports.pv_dj:OpenAdmin()`      | Abre el panel admin          |
| `exports.pv_dj:GetLocalSnap(id)` | Snapshot cacheado localmente |

#### 4.3 Ejemplos

**Loguear qué mesa está sonando**

```lua
-- server
CreateThread(function()
    while true do
        for id, st in pairs(exports.pv_dj:GetStations()) do
            local s = exports.pv_dj:GetState(id)
            if s and (s.A.playing or s.B.playing) then
                print(('[dj] %s A=%s B=%s'):format(id, s.A.title or '-', s.B.title or '-'))
            end
        end
        Wait(30000)
    end
end)
```

**Abrir una mesa desde otro script (por ejemplo un menú)**

```lua
-- client
exports.pv_dj:Open('palace')
```


---

# 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/dj/exports.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.
