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

# Duty status toggled

> Se dispara del lado del cliente después de que el jugador entra o sale de servicio.

Se dispara después de que el jugador entra/sale de servicio, del lado del cliente.

<CodeGroup>
  ```lua Event theme={null}
  AddEventHandler("jobs_creator:toggleDuty", function(isOnDuty)
  end)
  ```

  ```lua Example theme={null}
  AddEventHandler("jobs_creator:toggleDuty", function(isOnDuty)
      if(isOnDuty) then
          ESX.ShowNotification("You are now on duty")
      else
          ESX.ShowNotification("You are now off duty")
      end
  end)
  ```
</CodeGroup>

### Parámetros

| Nombre | Tipo de dato | Descripción |
| - | - | - |
| `isOnDuty` | boolean | El nuevo estado de servicio del jugador |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.