> For the complete documentation index, see [llms.txt](https://docs.brutalscripts.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.brutalscripts.com/site/scripts/police-job/exports-triggers.md).

# exports / triggers

## Client Exports / Triggers

<table><thead><tr><th width="445" align="center">Export</th><th align="center">Result</th></tr></thead><tbody><tr><td align="center">exports.brutal_policejob:getAvailableCopsCount()</td><td align="center">Number of police officers on duty on the server.</td></tr><tr><td align="center">exports.brutal_policejob:IsHandcuffed()</td><td align="center">true / false</td></tr><tr><td align="center">TriggerEvent('brutal_policejob:client:UseHandCuffKeyItem')</td><td align="center">You can remove the nearest player's handcuff with this event.</td></tr><tr><td align="center">TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'jail', TIME, REASON)</td><td align="center">To send the player jail.</td></tr><tr><td align="center">TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'cuff', MY_ID)</td><td align="center">Cuff trigger.</td></tr><tr><td align="center">TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'uncuff', MY_ID)</td><td align="center">Uncuff trigger</td></tr><tr><td align="center">TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'drag', MY_ID)</td><td align="center">Drag trigger.</td></tr><tr><td align="center"><p>x,y,z = table.unpack(GetEntityCoords(PlayerPedId()))</p><p>streetLabel = GetStreetNameFromHashKey(GetStreetNameAtCoord(x,y,z)) TriggerServerEvent('brutal_policejob:server:citizencall', 'create', text, {x,y,z}, streetLabel)</p></td><td align="center">ONLY FROM client side. With this event you can export to the mdt citizen calls.</td></tr><tr><td align="center">TriggerEvent('brutal_policejob:client:ToggleDuty')</td><td align="center">Switch between the duty status. ON/FALSE</td></tr></tbody></table>

For example:

<pre class="language-lua"><code class="lang-lua">local onlicePolice = exports.brutal_policejob:getAvailableCopsCount()
if onlicePolice >= 3 then
     print('enough cop to start the robbery')
end

RegisterCommand('jail', function()
<strong>     TARGET_ID = YOU_SHOULD_DEFINIED_IT
</strong><strong>     TIME = 60
</strong><strong>     REASON = 'Jail Reason'
</strong>     TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'jail', TIME, REASON)
end)

RegisterCommand('unjail', function()
    TARGET_ID = YOU_SHOULD_DEFINIED_IT
    TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'unjail')
end)

RegisterCommand('cuff', function()
<strong>     TARGET_ID = YOU_SHOULD_DEFINIED_IT
</strong><strong>     MY_ID = YOU_SHOULD_DEFINIED_IT
</strong>     TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'cuff', MY_ID)
end)

RegisterCommand('uncuff', function()
     TARGET_ID = YOU_SHOULD_DEFINIED_IT
     MY_ID = YOU_SHOULD_DEFINIED_IT
     TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'uncuff', MY_ID)
end)

RegisterCommand('drag', function()
     TARGET_ID = YOU_SHOULD_DEFINIED_IT
     MY_ID = YOU_SHOULD_DEFINIED_IT
     TriggerServerEvent('brutal_policejob:server:policeMenuEvent', TARGET_ID, 'drag', MY_ID)
end)
</code></pre>

## Server Events

```lua
TriggerEvent('brutal_policejob:server:getAvailableCopsCount', source, function(value)
    policeOnline =  value
end)


With this event you can get the player's Duty status. (true = false)

local player_job_name = YOU_SHOULD_DEFINIED_IT
TriggerEvent('brutal_policejob:server:GetDutyStatus', source, player_job_name, function(DutyStatus)
    if DutyStatus then
        print('Duty Status: true')
    else
        print('Duty Status: false')
    end
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, and the optional `goal` query parameter:

```
GET https://docs.brutalscripts.com/site/scripts/police-job/exports-triggers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
