isVehicleWindowIntact
IS_VEHICLE_WINDOW_INTACT0x46E571A0E20D01F1The 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.
isVehicleWindowIntact(vehicle: Vehicle, windowIndex: number): booleanisVehicleWindowIntact(vehicle: Vehicle, windowIndex: integer): booleanUsage
JavaScript
const result = isVehicleWindowIntact(vehicle, windowIndex);Lua
local result = isVehicleWindowIntact(vehicle, windowIndex)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
windowIndex | int | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanOn 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