> For the complete documentation index, see [llms.txt](https://piotreq-scripts.gitbook.io/piotreq-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://piotreq-scripts.gitbook.io/piotreq-scripts/assets-and-guides/ambulance-job/server-exports.md).

# Server Exports

{% hint style="info" %}
Here you will find the list of usable exports for Police Job, you can use them if you have basic or advanced programming knowledge, we do not recommend using these if you do not have such knowledge.
{% endhint %}

{% hint style="warning" %}
REMEMBER ABOUT CLIENT SIDE AND SERVER SIDE IN CHOOSING EXPORT!
{% endhint %}

***

## playerOnBed

```lua
Player(playerId).state.playerOnBed
```

* playerId: `number`
  * Existing player server id

Return:

* state: `boolean`

***

## Damages

With this statebag you can get player damages.

```lua
Player(playerId).state.damages
```

* playerId: `number`
  * Existing player server id

Return:

* damages: `table`

***

## Player Dead State

Use following statebag to check if player is dead

```lua
Player(playerId).state.isDead
```

* playerId: `number`
  * Existing player server id

Return:

* stage: `number [0 = not dead, 1 = in last stand, 2 = dead]`

***

## Check Death Stage

```lua
Player(playerId).state.deathStage
```

* playerId: `number`
  * Existing player server id

Return:

* stage: `number [0 = not dead, 1 = in last stand, 2 = dead]`

***

## RevivePlayer

Use following event to revive player

```lua
TriggerClientEvent('p_ambulancejob:RevivePlayer', playerId)
```

* playerId: `number`
  * Existing player server id

***


---

# 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://piotreq-scripts.gitbook.io/piotreq-scripts/assets-and-guides/ambulance-job/server-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.
