# General Exports

This page explains the available exports for the `r_bolawrap` script and how to use them. These client-side exports allow you to interact programmatically with the rope system from other resources.

***

### 1. Exports Overview

#### 1.1 Remove Ropes

```lua
exports['r_bolawrap']:RemoveRopes(targetServerId)
```

**Description:**\
Removes both the upper and lower rope states from a specific player.

**Parameters:**

* `targetServerId`: The server ID of the target player to remove ropes from.

***

#### 1.2 Set Recharge

```lua
exports['r_bolawrap']:SetRecharge(ammo)
```

**Description:**\
Sets the internal recharge count (rope ammo) of the bolawrap device for the local player.

**Parameters:**

* `ammo`*:* Number of rope charges to assign.

***

#### 1.3 Check Rope State

```lua
exports['r_bolawrap']:IsBolawrap(targetServerId)
```

**Description:**\
Returns the current rope state applied to the specified player.

**Parameters:**

* `targetServerId`: The server ID of the player to check for rope state.

**Returns:**

* `'both'`: If the player has both upper and lower ropes applied.
* `'upper'`: If only the upper body of the player is tied.
* `'lower'`: If only the lower body of the player is tied.
* `'nothing'`: If no ropes are applied to the player.

***

### 2. Example Usage

Here is a basic example of how to use the rope exports:

```lua
-- Remove all ropes from player with ID 18
exports['r_bolawrap']:RemoveRopes(18)

-- Set recharge (ammo) of the Bolawrap device to 2
exports['r_bolawrap']:SetRecharge(2)

-- Check the rope state of the player with ID 15
local ropeState = exports['r_bolawrap']:IsBolawrap(15)

if ropeState == 'both' then
    print("Player is fully tied!")
elseif ropeState == 'upper' then
    print("Player's upper body is restrained.")
elseif ropeState == 'lower' then
    print("Player's legs are tied.")
else
    print("Player is free.")
end
```


---

# 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.rytrak.fr/scripts/advanced-remote-restraint/general-exports.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.
