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

# Darf ausstellen

> Entscheiden, wer einem Spieler ein echtes Dokument ausstellen darf.

Wird bei jeder Ausstellung mit Aussteller aufgerufen: dem Admin-Befehl und dem Export [Ausstellen](/de/jaksam-identity/server/register/issue) mit `issuerSrc`. Nicht aufgerufen für Ämter, Starter-Dokumente oder die Konsole. Gib `false` zurück, um die Ausstellung zu blockieren (sie scheitert mit `not_allowed`).

Bearbeite `Editable.CanIssue` in `editable/server.lua`:

<CodeGroup>
  ```lua Function theme={null}
  function Editable.CanIssue(issuerSrc, targetSrc, typeId)
      return true
  end
  ```

  ```lua Example theme={null}
  -- Only police officers may issue firearms permits (ESX)
  function Editable.CanIssue(issuerSrc, targetSrc, typeId)
      if typeId == "weapon" then
          return ESX.GetPlayerFromId(issuerSrc).getJob().name == "police"
      end
      return true
  end
  ```
</CodeGroup>

### Parameter

| Name | Datentyp | Beschreibung |
| - | - | - |
| `issuerSrc` | integer | Server-ID des Spielers, der es ausstellt |
| `targetSrc` | integer | Server-ID des Spielers, der es bekommt |
| `typeId` | string | Der Dokumenttyp, ein Schlüssel von `Config.Documents` |

### Rückgabewert

| Name | Datentyp | Beschreibung |
| - | - | - |
| `allowed` | boolean | **true**, um die Ausstellung zu erlauben |


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