fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Client / VehicleDoorCollection

Class: VehicleDoorCollection

Manages a collection of vehicle doors associated with a specific vehicle.

Constructors

new VehicleDoorCollection()

new VehicleDoorCollection(owner): VehicleDoorCollection

Parameters

owner: Vehicle

Returns

VehicleDoorCollection

Defined in

client/models/VehicleDoorCollection.ts:10

Accessors

Owner

get Owner(): Vehicle

Returns

Vehicle

Defined in

client/models/VehicleDoorCollection.ts:12


VehicleDoors

get VehicleDoors(): Map<VehicleDoorIndex, VehicleDoor>

Returns

Map<VehicleDoorIndex, VehicleDoor>

Defined in

client/models/VehicleDoorCollection.ts:16

Methods

breakAllDoors()

breakAllDoors(stayInTheWorld?): void

Breaks all doors in the current context.

Parameters

stayInTheWorld?: boolean

Optional parameter, if set to true, the doors will stay in the world after being broken.

Returns

void

Defined in

client/models/VehicleDoorCollection.ts:59


closeAllDoors()

closeAllDoors(instantly): void

Closes all doors in the system.

Parameters

instantly: boolean

Determines whether the doors should close instantly or not.

Returns

void

This method does not return a value.

Defined in

client/models/VehicleDoorCollection.ts:72


getAllDoors()

getAllDoors(): VehicleDoor[]

Retrieves all doors associated with the vehicle.

Returns

VehicleDoor[]

An array containing all valid vehicle doors.

Defined in

client/models/VehicleDoorCollection.ts:39


getDoor()

getDoor(index): VehicleDoor

Retrieves the door of the vehicle at the given index.

Parameters

index: VehicleDoorIndex

The index of the door to retrieve.

Returns

VehicleDoor

The door at the specified index.

Defined in

client/models/VehicleDoorCollection.ts:27


hasDoor()

hasDoor(index): boolean

Checks if the vehicle has a specified door.

Parameters

index: VehicleDoorIndex

The index of the vehicle door to check.

Returns

boolean

True if the vehicle has the specified door, false otherwise.

Defined in

client/models/VehicleDoorCollection.ts:128


openAllDoors()

openAllDoors(loose?, instantly?): void

Opens all doors associated with the current object.

Parameters

loose?: boolean

If true, doors will open loosely.

instantly?: boolean

If true, doors will open instantly.

Returns

void

This method does not return any value.

Defined in

client/models/VehicleDoorCollection.ts:86


setControlForAll()

setControlForAll(speed?, angle?): void

Sets control parameters for all doors managed by this instance.

Parameters

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.

Returns

void

Defined in

client/models/VehicleDoorCollection.ts:100


setLatchedForAll()

setLatchedForAll(forceClose, lock, p4?): void

Sets the latched state for all doors.

Parameters

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.

Returns

void

Defined in

client/models/VehicleDoorCollection.ts:115