> 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/dealerships-creator/client/on-test-drive-vehicle-spawn.md).

# On test drive vehicle spawn

This event is triggered after a vehicle of test drive is spawned on the client doing the test drive

## Event

```lua
AddEventHandler("dealerships_creator:testDrive:vehicleSpawned", function(vehicle, vehicleNetId, plate)

end)
```

### Parameters

| Name           | Data Type | Description            |
| -------------- | --------- | ---------------------- |
| `vehicle`      | integer   | The vehicle handle     |
| `vehicleNetId` | integer   | The vehicle network ID |
| `plate`        | string    | The vehicle's plate    |

## Example

```lua
EventHandler("dealerships_creator:testDrive:vehicleSpawned", function(vehicle, vehicleNetId, plate)
    SetVehicleFuelLevel(vehicle, 100.0)

    -- You may want to give vehicle keys somehow
end)
```
