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

# Schlüssel kopiert

> Wird server-seitig ausgelöst, wenn ein Dieb den Schlüssel eines Autos mit dem Schlüssel-Programmierer kopiert.

Wird ausgelöst, wenn ein Dieb eine Kopie mit dem [Schlüssel-Programmierer](https://docs.jaksam-scripts.com/de/vehicles-keys/guides/key-cloning.md) fertigstellt. Der Rohling ist schon verbraucht und die Kopie schon gegeben.

```lua Event theme={null}
AddEventHandler("vehicles_keys:keyCloned", function(playerId, plate, vehicleNetId, isItem)

end)
```

### Parameter

| Name | Datentyp | Beschreibung |
| - | - | - |
| `playerId` | integer | Server-ID des Diebs |
| `plate` | string | Kennzeichen des Autos, ohne Leerzeichen am Rand und in Großbuchstaben |
| `vehicleNetId` | integer | Netzwerk-ID des Autos |
| `isItem` | boolean | `true`: die Kopie ist ein Schlüssel-Item ([Schlüssel als Items](https://docs.jaksam-scripts.com/de/vehicles-keys/guides/keys-as-items.md) an). `false`: ein virtueller Schlüssel |

## Beispiel

```lua theme={null}
AddEventHandler("vehicles_keys:keyCloned", function(playerId, plate, vehicleNetId, isItem)
    print(GetPlayerName(playerId) .. " copied the key of " .. plate .. (isItem and " (key item)" or " (virtual key)"))
end)
```

> [!NOTE]
>
> Eine Kopie eines Spielerautos funktioniert, bis der Besitzer das Schloss wechselt. Eine Kopie eines Autos ohne Besitzer funktioniert bis zum nächsten Neustart.


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