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 / VehicleDoorCollection
Manages a collection of vehicle doors associated with a specific vehicle.
new VehicleDoorCollection(
owner
):VehicleDoorCollection
• owner: Vehicle
client/models/VehicleDoorCollection.ts:10
get
Owner():Vehicle
client/models/VehicleDoorCollection.ts:12
get
VehicleDoors():Map
<VehicleDoorIndex
,VehicleDoor
>
Map
<VehicleDoorIndex
, VehicleDoor
>
client/models/VehicleDoorCollection.ts:16
breakAllDoors(
stayInTheWorld
?):void
Breaks all doors in the current context.
• stayInTheWorld?: boolean
Optional parameter, if set to true, the doors will stay in the world after being broken.
void
client/models/VehicleDoorCollection.ts:59
closeAllDoors(
instantly
):void
Closes all doors in the system.
• instantly: boolean
Determines whether the doors should close instantly or not.
void
This method does not return a value.
client/models/VehicleDoorCollection.ts:72
getAllDoors():
VehicleDoor
[]
Retrieves all doors associated with the vehicle.
An array containing all valid vehicle doors.
client/models/VehicleDoorCollection.ts:39
getDoor(
index
):VehicleDoor
Retrieves the door of the vehicle at the given index.
• index: VehicleDoorIndex
The index of the door to retrieve.
The door at the specified index.
client/models/VehicleDoorCollection.ts:27
hasDoor(
index
):boolean
Checks if the vehicle has a specified door.
• index: VehicleDoorIndex
The index of the vehicle door to check.
boolean
True if the vehicle has the specified door, false otherwise.
client/models/VehicleDoorCollection.ts:128
openAllDoors(
loose
?,instantly
?):void
Opens all doors associated with the current object.
• loose?: boolean
If true, doors will open loosely.
• instantly?: boolean
If true, doors will open instantly.
void
This method does not return any value.
client/models/VehicleDoorCollection.ts:86
setControlForAll(
speed
?,angle
?):void
Sets control parameters for all doors managed by this instance.
• speed?: number
The speed parameter to set for each door. Defaults to undefined.
• angle?: number
The angle parameter to set for each door. Defaults to undefined.
void
client/models/VehicleDoorCollection.ts:100
setLatchedForAll(
forceClose
,lock
,p4
?):void
Sets the latched state for all doors.
• forceClose: boolean
Indicates if the doors should be forcefully closed.
• lock: boolean
Indicates if the doors should be locked.
• p4?: boolean
Optional parameter to set additional state on the doors.
void