> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get if a player is on duty

> Check whether a specific player is currently on duty.

Returns whether the player is on duty or not.

<CodeGroup>
  ```lua Export theme={null}
  exports["jobs_creator"]:isPlayerOnDuty(playerId)
  ```

  ```lua Example theme={null}
  local playerId = 52
  print("Player ID " .. playerId .. " is on duty: " .. tostring(exports["jobs_creator"]:isPlayerOnDuty(playerId)))
  ```
</CodeGroup>

### Parameters

| Name       | Data Type | Description               |
| ---------- | --------- | ------------------------- |
| `playerId` | integer   | Target player's server ID |

### Return value

| Name       | Data Type | Description                                                            |
| ---------- | --------- | ---------------------------------------------------------------------- |
| `isOnDuty` | boolean   | **true** if the player is on-duty, **false** if the player is off-duty |


## Related topics

- [Duty](/jobs-creator/server/duty/index.md)
- [Get if local player is handcuffed](/jobs-creator/client/actions/get-if-local-player-is-handcuffed.md)
- [Get if local player owns a plate](/vehicles-keys/client/get-if-local-player-owns-a-plate.md)
- [Get if player ID owns a plate](/vehicles-keys/server/get-if-player-id-owns-a-plate.md)
- [Get if player is owner of vehicle plate](/jobs-creator/server/buyable-vehicles/get-if-player-is-owner-of-vehicle-plate.md)
