> For the complete documentation index, see [llms.txt](https://docs.arius-scripts.com/site/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arius-scripts.com/site/documentation/resources/ambulance-job/exports-and-events.md).

# Exports & Events

## EXPORTS

How to check if a player is dead

1. ```lua
   exports.ars_ambulancejob:isDead() -- returns true if dead
   ```
2. ```lua
   LocalPlayer.state.dead -- returns true if dead
   ```
3. ```lua
   local data = lib.callback.await('ars_ambulancejob:getData', false, targetServerId)
   local isDead = data.status.isDead
   ```

&#x20;  **Usage example**  &#x20;

```lua
RegisterCommand("test", function(source, args, rawCommand)
    local isDead = LocalPlayer.state.dead
    if isDead then
        print("player is dead")
    else
        print("alive")
    end    
end)
```

***

How to open distress call dialog

```lua
exports.ars_ambulancejob:createDistressCall()
```

&#x20;  **Usage example**  &#x20;

<pre class="language-lua"><code class="lang-lua">RegisterCommand("test2", function(source, args, rawCommand)
<strong>    exports.ars_ambulancejob:createDistressCall()
</strong><strong>end)
</strong></code></pre>

***

How to open distress calls menu

<pre class="language-lua"><code class="lang-lua"><strong>exports.ars_ambulancejob:openDistressCalls()
</strong></code></pre>

&#x20;  **Usage example**&#x20;

```lua
RegisterCommand("test3", function(source, args, rawCommand)
    exports.ars_ambulancejob:openDistressCalls()
end)
```

## EVENTS

How to use heal event (client)

1. ```lua
   TriggerEvent('ars_ambulancejob:healPlayer', {revive = true}) -- to revive player
   ```
2. <pre class="language-lua"><code class="lang-lua"><strong>TriggerEvent('ars_ambulancejob:healPlayer', {heal = true}) -- to heal player
   </strong></code></pre>
3. ```lua
   TriggerEvent('ars_ambulancejob:healPlayer', {injury = true, bone = "head" }) -- to heal injury of player
   ```

&#x20;  **Usage example**&#x20;

```lua
RegisterCommand("test4", function(source, args, rawCommand)
  TriggerEvent('ars_ambulancejob:healPlayer', {revive = true}) -- to revive player
end)

RegisterCommand("test5", function(source, args, rawCommand)
 TriggerEvent('ars_ambulancejob:healPlayer', {heal = true}) -- to heal player
end)

RegisterCommand("test6", function(source, args, rawCommand)
TriggerEvent('ars_ambulancejob:healPlayer', {injury = true, bone = "head" }) -- to heal injury of player
end)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.arius-scripts.com/site/documentation/resources/ambulance-job/exports-and-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.
