> For the complete documentation index, see [llms.txt](https://xtdev.gitbook.io/xt-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xtdev.gitbook.io/xt-docs/free-resources/duty-menu/installation-and-usage.md).

# Installation & Usage

```lua
-- Check Duty State --
local duty = LocalPlayer.state.onDuty     -- Client
local duty = Player(source).state.onDuty  -- Server

-- Toggle Duty --
exports['xt-duty']:toggleDuty()           -- Client Only

-- Set Duty State --
exports['xt-duty']:setDuty(state)         -- Client Only

-- States
[0 & false] = Off Duty
[1 & true] = On Duty
```
