VehicleClientChecked by LS:MP

isVehicleWindowIntact

IS_VEHICLE_WINDOW_INTACT0x46E571A0E20D01F1

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

SignatureJavaScript
isVehicleWindowIntact(vehicle: Vehicle, windowIndex: number): boolean
SignatureLua
isVehicleWindowIntact(vehicle: Vehicle, windowIndex: integer): boolean

Usage

JavaScript
const result = isVehicleWindowIntact(vehicle, windowIndex);
Lua
local result = isVehicleWindowIntact(vehicle, windowIndex)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
windowIndexintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

On LS:MP

ℹ
Checked by LS:MP

windowIndex must be between 0 and 7. Otherwise the call is ignored and returns false: 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.

This will return false if the window is broken, or rolled down.
Window indexes:
0 = Front Right Window
1 = Front Left Window
2 = Back Right Window
3 = Back Left Window

Those numbers go on for vehicles that have more than 4 doors with windows.

Reference

Namespace
Vehicle VEHICLE
In the game
BOOL IS_VEHICLE_WINDOW_INTACT(Vehicle vehicle, int windowIndex)
Hash
0x46E571A0E20D01F1

Open in the interactive natives reference