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

> Se dispara después de que un jugador entra o sale de servicio, del lado del servidor.

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

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

  ```lua Example theme={null}
  RegisterNetEvent("jobs_creator:toggleDuty", function(playerId, jobName, isOnDuty)
      if(isOnDuty) then
          TriggerEvent("external_scoreboard:increaseOnDutyCount", jobName)
      else
          TriggerEvent("external_scoreboard:decreaseOnDutyCount", jobName)
      end
  end)
  ```
</CodeGroup>

### Parámetros

| Nombre | Tipo de dato | Descripción |
| - | - | - |
| `playerId` | integer | ID de servidor del jugador objetivo |
| `jobName` | string | ID del trabajo del jugador |
| `isOnDuty` | boolean | Nuevo estado de servicio del jugador |


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