a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Client / VehicleWindow
Represents a vehicle window with various functionalities to manipulate and check the state of the window.
new VehicleWindow(
owner
,index
):VehicleWindow
Creates an instance of the class.
• owner: Vehicle
The vehicle to which the window belongs.
• index: VehicleWindowIndex
The index position of the window in the vehicle.
client/models/VehicleWindow.ts:14
get
Index():VehicleWindowIndex
Retrieves the current index of the vehicle window.
set
Index(index
):void
Sets the index of the vehicle window.
• index: VehicleWindowIndex
The index to set for the vehicle window.
The index of the vehicle window.
client/models/VehicleWindow.ts:33
get
Owner():Vehicle
Gets the owner of the vehicle.
The owner of the vehicle.
client/models/VehicleWindow.ts:24
break():
void
Breaks the vehicle window associated with the specified owner and index.
This method triggers the game native to smash the vehicle window based on the provided owner’s handle and the window index.
void
client/models/VehicleWindow.ts:77
isIntact():
boolean
Checks whether the window of a vehicle is intact.
boolean
True if the vehicle window is intact, otherwise false.
client/models/VehicleWindow.ts:50
remove():
void
Removes a vehicle window based on the owner’s handle and window index.
void
client/models/VehicleWindow.ts:105
repair():
void
Repair a vehicle window
void
This method use a native coded to not work on vehicles of type: CBike
, Bmx
, CBoat
, CTrain
and CSubmarine
.
client/models/VehicleWindow.ts:98
rollDown():
void
Rolls down the window of the specified car.
void
client/models/VehicleWindow.ts:67
rollUp():
void
Rolls up the current window.
This method collapses the window associated with the owner and index properties into a roll-up state.
void
client/models/VehicleWindow.ts:60
smash():
void
Smashes the vehicle window associated with this object.
This method is responsible for invoking the command to smash the window of the vehicle that is identified by the owner and index properties.
void