> ## 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.

# Toggle current duty status

> Trigger to toggle or explicitly set the player's current duty status.

Trigger to toggle the current duty status of the player.

## Toggle

This will toggle the current duty status of the player (if they were off duty, they will go on duty, and vice versa).

<CodeGroup>
  ```lua Event theme={null}
  TriggerEvent("jobs_creator:toggleCurrentDutyStatus")
  ```

  ```lua Example theme={null}
  -- Toggles the current duty status
  RegisterCommand("duty", function()
      TriggerEvent("jobs_creator:toggleCurrentDutyStatus")
  end, false)
  ```
</CodeGroup>

## Set explicitly

This will set the duty status of the player to the given status instead of toggling it.

<CodeGroup>
  ```lua Event theme={null}
  TriggerEvent("jobs_creator:toggleCurrentDutyStatus", newDutyStatus)
  ```

  ```lua Example theme={null}
  RegisterCommand("onduty", function()
      TriggerEvent("jobs_creator:toggleCurrentDutyStatus", true)
  end, false)
  RegisterCommand("offduty", function()
      TriggerEvent("jobs_creator:toggleCurrentDutyStatus", false)
  end, false)
  ```
</CodeGroup>


## Related topics

- [Duty](/jobs-creator/client/duty/index.md)
- [Duty status toggled](/jobs-creator/client/duty/duty-status-toggled.md)
- [Duty status changed](/jobs-creator/server/duty/duty-status-changed.md)
- [Toggle hotwiring](/vehicles-keys/client/toggle-hotwiring.md)
