> For the complete documentation index, see [llms.txt](https://documentation.jaksam-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.jaksam-scripts.com/vehicles-keys/server/give-keys-to-identifier.md).

# Give keys to identifier

## Export

```lua
exports["vehicles_keys"]:giveVehicleKeysToIdentifier(identifier, plate, type)
```

### Parameters

| Name         | Data Type         | Description                                                                                               |
| ------------ | ----------------- | --------------------------------------------------------------------------------------------------------- |
| `identifier` | string            | The target player identifier/license                                                                      |
| `plate`      | string            | The vehicle plate                                                                                         |
| `type`       | string (optional) | The vehicle type. The default will be "temporary". Available types: "temporary", "owned", "other\_player" |

## Example

```lua
RegisterNetEvent("vehicle_shop:playerBoughtVehicle", function(playerId, plate)
    local xPlayer = ESX.GetPlayerFromId(playerId)
    local identifier = xPlayer.identifier

    exports["vehicles_keys"]:giveVehicleKeysToIdentifier(identifier, plate, "owned")
end)
```
