# Commands & Export

### 💬 Commands

The script includes a variety of built-in commands for administrative control, player interaction, and minigame access.

#### 🧑‍⚖️ Jail Commands

* **`/jailmenu`**\
  Opens the jail management interface for authorized users. This menu allows you to jail nearby players, set durations, assign tasks, and review player details.
*

```
<figure><img src="../../.gitbook/assets/image (85).png" alt=""><figcaption></figcaption></figure>
```

* **`/jailList`**\
  Displays a full list of all current inmates along with their jail time, tasks completed, and escape status. Only accessible by authorized staff.
*

```
<figure><img src="../../.gitbook/assets/image (84).png" alt=""><figcaption></figcaption></figure>
```

#### 🏀 Basketball Command

* **`/basket`** (or your configured command name)\
  Spawns a basketball in the yard if the player is inside a valid basketball zone. The command respects a maximum spawn limit defined in the config.

  After spawning the ball, players are prompted with controls for:

  * Picking up the ball
  * Changing dribble style
  * Shooting the ball
  * Detaching the ball
  *

  ```
  <figure><img src="../../.gitbook/assets/image (86).png" alt=""><figcaption></figcaption></figure>
  ```

***

#### 🎲 Dice Game Commands

* **`/dicesend [id] [amount]`**\
  Sends a dice game request to a nearby player with the specified bet amount.
* **`/diceaccept`**\
  Accepts an incoming dice game request.
* **`/dicedeny`**\
  Rejects an incoming dice game request.
*

```
<figure><img src="../../.gitbook/assets/image (87).png" alt=""><figcaption></figcaption></figure>
```

### Export: JailPlayer

Send players to jail from any external resource (MDT, policejob, etc.).

#### Usage (Server-Side)

```lua
exports['frkn-prison']:JailPlayer(copSource, targetSource, jailTime, reason)
```

#### Parameters

| Parameter      | Type     | Description                                         |
| -------------- | -------- | --------------------------------------------------- |
| `copSource`    | `number` | Server ID of the officer sending the player to jail |
| `targetSource` | `number` | Server ID of the player being jailed                |
| `jailTime`     | `number` | Jail duration in minutes                            |
| `reason`       | `string` | Reason for imprisonment                             |

#### Example

```lua
-- Jail a player for 30 minutes
exports['frkn-prison']:JailPlayer(source, targetPlayerId, 30, "Armed Robbery")
```

#### What It Does

* Teleports the player to prison
* Saves and clears the player's inventory
* Assigns prison tasks (Dish Washing, Exercise, Cleaning)
* Creates a database record
* Automatically releases the player and restores inventory when time is up


---

# 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.0resmon.org/0resmon/frkn-resources/frkn-prison/commands-and-export.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.
