# exports / triggers

## Client Exports / Triggers

<table><thead><tr><th width="500" align="center">Export</th><th align="center">Result</th></tr></thead><tbody><tr><td align="center">exports.brutal_ambulancejob:getAvailableDoctorsCount()</td><td align="center">Number of doctors available</td></tr><tr><td align="center">exports.brutal_ambulancejob:IsDead(serverid)</td><td align="center">true / false<br>(Server id is only needed if you want to check an another player)</td></tr><tr><td align="center">TriggerEvent('brutal_ambulancejob:revive')</td><td align="center">Client side trigger to revive</td></tr><tr><td align="center">TriggerEvent('brutal_ambulancejob:client:ToggleDuty')</td><td align="center">Switch between the duty status. ON/FALSE</td></tr></tbody></table>

For example:

```lua
local onliceAmbulancers = exports.brutal_ambulancejob:getAvailableDoctorsCount()
print('Available doctors count:', onliceAmbulancers)

local deadStatus = exports.brutal_ambulancejob:IsDead()

if deadStatus == true then
    print('Dead')
elseif deadStatus == false then
     print('Not Dead')
end
```

```lua
AddEventHandler('brutal_ambulancejob:revive', function()
    -- this event run when the player revived. You can put this to in all scripts.
end)

AddEventHandler('brutal_ambulancejob:server:heal', function()
    -- this event run when the player healed. You can put this to in all scripts.
end)
```

## Server Event

With this event you can get the player's Duty status. (true = false)\
**player\_job\_name = You must enter the player's job name.**

```lua
local player_job_name = YOU_SHOULD_DEFINIED_IT
TriggerEvent('brutal_ambulancejob:server:GetDutyStatus', player_job_name, function(DutyStatus)
    if DutyStatus then
        print('Duty Status: true')
    else
        print('Duty Status: false')
    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.brutalscripts.com/site/scripts/ambulance-job/exports-triggers.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.
