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

# Vehicle window broken

> Triggered server side when a player breaks a vehicle window.

```lua Event theme={null}
RegisterNetEvent("vehicles_keys:vehicleWindowBroken", function(playerId, vehicleNetId)

end)
```

### Parameters

| Name           | Data Type | Description                               |
| -------------- | --------- | ----------------------------------------- |
| `playerId`     | integer   | The player server ID who broke the window |
| `vehicleNetId` | integer   | The vehicle network ID                    |

## Example

```lua theme={null}
RegisterNetEvent("vehicles_keys:vehicleWindowBroken", function(playerId, vehicleNetId)
    local vehicle = NetworkGetEntityFromNetworkId(vehicleNetId)

    print(GetPlayerName(playerId) .. " broke the window of plate " .. GetVehicleNumberPlateText(vehicle))
end)
```


## Related topics

- [Server](/vehicles-keys/server/index.md)
- [FAQ](/vehicles-keys/faq.md)
- [Vehicle spawned](/jobs-creator/client/buyable-vehicles/vehicle-spawned.md)
