> For the complete documentation index, see [llms.txt](https://docs.rytrak.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rytrak.fr/scripts/advanced-helicopter-bucket/general-exports.md).

# General Exports

This page explains the available **client-side** exports for the **r\_hbucket** and their usage. These exports allow you to interact with the script programmatically from other resources.

***

### **1. Exports Overview** <a href="#id-1.-exports-overview" id="id-1.-exports-overview"></a>

#### **1.1 Get Bucket Water Quantity**

```lua
exports['r_hbucket']:GetAerialWaterQuantity(netId)
```

**Description:** Returns the current **water quantity** of a helicopter using its network ID.

**Parameters:**

* `netId`: The network ID of the helicopter.

**Returns:**

* `number`: The quantity of water remaining. Returns `nil` if the entity doesn't exist or isn't tracked.

**Example Usage:**

```lua
local netId = NetworkGetNetworkIdFromEntity(vehicle)
local quantity = exports['r_hbucket']:GetAerialWaterQuantity(netId)
```

***

#### **1.2 Set Bucket Water Quantity**

```lua
exports['r_hbucket']:SetAerialWaterQuantity(netId, quantity)
```

**Description:** Sets a new **water quantity** for a specific helicopter and syncs the change with the server.

**Parameters:**

* `netId`: The network ID of the helicopter.
* `quantity`: The new amount of water to set.

**Example Usage:**

```lua
local netId = NetworkGetNetworkIdFromEntity(vehicle)
exports['r_hbucket']:SetAerialWaterQuantity(netId, 1500)
```
