# General Events

This page explains the available event for the **r\_scba** script and its usage. This event allows other resources to interact with the SCBA system programmatically, especially to dynamically manage EUP components based on the SCBA state.

***

### 1. Client-Side Events

#### 1.1 Set SCBA EUP State

* **Event Name:** `r_scba:client:setSCBA`
* **Description:** Updates the player's SCBA EUP state by adding or removing specific components.
* **Parameters:**
  * `value` *(integer)*: Determines the SCBA visual configuration.
    * `0`: Removes the SCBA EUP from the player.
    * `1`: Adds the **unlinked** SCBA EUP (e.g., without the mask connected).
    * `2`: Adds the **linked** SCBA EUP (e.g., full setup with mask connected).

> This is especially useful when you want to attach an additional EUP component (such as a mask, tube, or chest accessory) depending on the SCBA state.

***

### 2. Example Usage

Here’s how you can register and handle the event in your client script:

```lua
RegisterNetEvent('r_scba:client:setSCBA')
AddEventHandler('r_scba:client:setSCBA', function(value)
    if value == 0 then
        -- Remove SCBA component from player
    elseif value == 1 then
        -- Add SCBA EUP without mask (unlink)
    elseif value == 2 then
        -- Add full SCBA EUP with mask (link)
    end
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/firefighter-scba-system/general-events.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.
