VehicleClientChecked by LS:MP

smashVehicleWindow

SMASH_VEHICLE_WINDOW0x9E5B5E4D2CCD2259

The GTA V native SMASH_VEHICLE_WINDOW of the VEHICLE namespace, as LS:MP client scripts call it: the global function smashVehicleWindow, in JavaScript and in Lua.

SignatureJavaScript
smashVehicleWindow(vehicle: Vehicle, windowIndex: number): void
SignatureLua
smashVehicleWindow(vehicle: Vehicle, windowIndex: integer)

Usage

JavaScript
smashVehicleWindow(vehicle, windowIndex);
Lua
smashVehicleWindow(vehicle, windowIndex)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
windowIndexintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

windowIndex must be between 0 and 7. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

windowIndex:
0 = Front Left Window
1 = Front Right Window
2 = Rear Left Window
3 = Rear Right Window
4 = Front Windscreen
5 = Rear Windscreen
6 = Mid Left
7 = Mid Right
8 = Invalid

Reference

Namespace
Vehicle VEHICLE
In the game
void SMASH_VEHICLE_WINDOW(Vehicle vehicle, int windowIndex)
Hash
0x9E5B5E4D2CCD2259

Open in the interactive natives reference