# Exports/Triggers

## TRIGGERS/EXPORTS Lua code examples for Client Side

```lua
TriggerEvent("sfdoj:tabletopen") -- open police tablet
```

```lua
TriggerEvent("nuifix") -- if the NUI breaks.
```

## EXPORTS Lua code examples for Server Side

```lua
exports["sfdoj"]:getOnlinePlayers()
-- return table with data (source, fullname, phone_number, grade) 
```

In your radio script, add export so that the tablet shows data on which radio the officer is on

```lua
local source = source
local channel = 1 -- for e.g.
exports["sfdoj"]:setChannelRadio(source, channel)
```


---

# Agent Instructions: 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:

```
GET https://docs.scriptsfivem.com/resources/sfdoj/exports-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
