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 / VehicleDoor
Represents a door of a vehicle and provides various methods to interact with it.
new VehicleDoor(
owner
,index
):VehicleDoor
• owner: Vehicle
• index: VehicleDoorIndex
client/models/VehicleDoor.ts:9
get
AngleRatio():number
number
client/models/VehicleDoor.ts:22
set
CanBreak(isBreakable
):void
• isBreakable: boolean
client/models/VehicleDoor.ts:50
get
Index():VehicleDoorIndex
client/models/VehicleDoor.ts:18
get
IsClosed():boolean
boolean
client/models/VehicleDoor.ts:42
get
IsDamaged():boolean
boolean
client/models/VehicleDoor.ts:34
get
IsFullyOpen():boolean
boolean
client/models/VehicleDoor.ts:46
get
IsOpen():boolean
boolean
client/models/VehicleDoor.ts:38
get
LockStatus():VehicleLockState
set
LockStatus(lockState
):void
• lockState: VehicleLockState
client/models/VehicleDoor.ts:26
get
Owner():Vehicle
client/models/VehicleDoor.ts:14
break(
stayInTheWorld
?):void
Breaks the vehicle door with the option to keep it in the world.
• stayInTheWorld?: boolean
= true
Determines whether the broken door stays in the world.
void
client/models/VehicleDoor.ts:60
close(
instantly
?):void
Closes the vehicle door associated with this instance.
• instantly?: boolean
= false
Indicates whether the door should be closed instantly (true) or with normal animation (false).
void
client/models/VehicleDoor.ts:71
open(
loose
?,openInstantly
?):void
Opens a vehicle door.
• loose?: boolean
= false
Indicates if the door should be opened loosely.
• openInstantly?: boolean
= false
If true, the door opens instantly.
void
client/models/VehicleDoor.ts:83
setControl(
speed
?,angle
?):void
Controls the door of the vehicle by setting its speed and angle.
• speed?: number
= 0.5
The speed at which the door should move. Default is 0.5.
• angle?: number
= 45
The angle to which the door should be moved. Default is 45 degrees.
void
client/models/VehicleDoor.ts:95
setLatched(
forceClose
,lock
,p4
?):void
Sets the latch state of the vehicle door.
• forceClose: boolean
A flag determining whether to force the door closed.
• lock: boolean
A flag indicating whether to lock the door.
• p4?: boolean
= true
An optional unknown and undocumented parameter
void
This method does not return a value.