> ## 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 déclenche après qu'un joueur prend ou quitte son service, côté serveur.

Se déclenche après qu'un joueur prend/quitte son service, côté serveur.

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

### Paramètres

| Nom | Type de donnée | Description |
| - | - | - |
| `playerId` | integer | Server ID du joueur cible |
| `jobName` | string | ID du job du joueur |
| `isOnDuty` | boolean | Le nouveau statut de service du joueur |


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