Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Vehicle(handle: number): Vehicle

Properties

Private _doors

_doors: undefined | VehicleDoorCollection

Private _mods

_mods: undefined | VehicleModCollection

Private _wheels

_wheels: undefined | VehicleWheelCollection

Private _windows

_windows: undefined | VehicleWindowCollection

Protected bones

bones: undefined | EntityBoneCollection

Protected handle

handle: number

Protected stateBagCookies

stateBagCookies: number[] = []

Accessors

Acceleration

  • get Acceleration(): number

AlarmTimeLeft

  • get AlarmTimeLeft(): number
  • set AlarmTimeLeft(value: number): void

AreBrakeLightsOn

  • set AreBrakeLightsOn(value: boolean): void

AreHighBeamsOn

  • get AreHighBeamsOn(): boolean
  • set AreHighBeamsOn(value: boolean): void

AreLightsOn

  • get AreLightsOn(): boolean
  • set AreLightsOn(value: boolean): void

AttachedBlip

  • get AttachedBlip(): null | Blip

BodyHealth

  • get BodyHealth(): number
  • set BodyHealth(value: number): void

Bones

CanBeVisiblyDamaged

  • set CanBeVisiblyDamaged(value: boolean): void

CanBreak

  • set CanBreak(toggle: boolean): void

CanDeformWheels

  • set CanDeformWheels(value: boolean): void

CanEngineDegrade

  • set CanEngineDegrade(value: boolean): void

CanTiresBurst

  • get CanTiresBurst(): boolean
  • set CanTiresBurst(value: boolean): void

CanWheelsBreak

  • set CanWheelsBreak(value: boolean): void

ClassDisplayName

  • get ClassDisplayName(): string

ClassType

CurrentGear

  • get CurrentGear(): number

CurrentRPM

  • get CurrentRPM(): number
  • set CurrentRPM(value: number): void

DirtLevel

  • get DirtLevel(): number
  • set DirtLevel(value: number): void

DisplayName

  • get DisplayName(): string

Doors

Driver

  • get Driver(): Ped

DropsMoneyOnExplosion

  • set DropsMoneyOnExplosion(value: boolean): void

EngineHealth

  • get EngineHealth(): number
  • set EngineHealth(value: number): void

EnginePowerMultiplier

  • set EnginePowerMultiplier(value: number): void

EngineTorqueMultiplier

  • set EngineTorqueMultiplier(value: number): void

FuelLevel

  • get FuelLevel(): number
  • set FuelLevel(value: number): void

Gravity

  • get Gravity(): number
  • set Gravity(value: number): void

Handle

  • get Handle(): number

HasBombBay

  • get HasBombBay(): boolean

HasCollided

  • get HasCollided(): boolean

HasGravity

  • set HasGravity(value: boolean): void

HasRoof

  • get HasRoof(): boolean

Heading

  • get Heading(): number
  • set Heading(heading: number): void

Health

  • get Health(): number
  • set Health(amount: number): void

HeightAboveGround

  • get HeightAboveGround(): number

HighGear

  • get HighGear(): number
  • set HighGear(value: number): void

IsAlarmSet

  • get IsAlarmSet(): boolean
  • set IsAlarmSet(value: boolean): void

IsAlarmSounding

  • get IsAlarmSounding(): boolean

IsAxlesStrong

  • set IsAxlesStrong(value: boolean): void

IsBurnoutForced

  • set IsBurnoutForced(value: boolean): void

IsCollisionEnabled

  • get IsCollisionEnabled(): boolean
  • set IsCollisionEnabled(value: boolean): void

IsConvertible

  • get IsConvertible(): boolean

IsDamaged

  • get IsDamaged(): boolean

IsDriveable

  • get IsDriveable(): boolean
  • set IsDriveable(value: boolean): void

IsEngineOnFire

  • get IsEngineOnFire(): boolean

IsEngineRunning

  • get IsEngineRunning(): boolean
  • set IsEngineRunning(value: boolean): void

IsEngineStarting

  • get IsEngineStarting(): boolean
  • set IsEngineStarting(value: boolean): void

IsFrontBumperBrokenOff

  • get IsFrontBumperBrokenOff(): boolean

IsHandbrakeForcedOn

  • get IsHandbrakeForcedOn(): boolean
  • set IsHandbrakeForcedOn(value: boolean): void

IsInAir

  • get IsInAir(): boolean

IsInBurnout

  • get IsInBurnout(): boolean

IsInWater

  • get IsInWater(): boolean

IsInteriorLightOn

  • get IsInteriorLightOn(): boolean
  • set IsInteriorLightOn(value: boolean): void

IsInvincible

  • set IsInvincible(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsLeftHeadLightBroken

  • get IsLeftHeadLightBroken(): boolean

IsLeftIndicatorLightOn

  • get IsLeftIndicatorLightOn(): boolean
  • set IsLeftIndicatorLightOn(value: boolean): void

IsOccluded

  • get IsOccluded(): boolean

IsOnAllWheels

  • get IsOnAllWheels(): boolean

IsOnFire

  • get IsOnFire(): boolean

IsOnScreen

  • get IsOnScreen(): boolean

IsOnlyDamagedByPlayer

  • set IsOnlyDamagedByPlayer(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsPersistent

  • get IsPersistent(): boolean
  • set IsPersistent(value: boolean): void

IsPositionFrozen

  • set IsPositionFrozen(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsRadioEnabled

  • get IsRadioEnabled(): boolean
  • set IsRadioEnabled(value: boolean): void

IsRearBumperBrokenOff

  • get IsRearBumperBrokenOff(): boolean

IsRecordingCollisions

  • set IsRecordingCollisions(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsRightHeadLightBroken

  • get IsRightHeadLightBroken(): boolean

IsRightIndicatorLightOn

  • get IsRightIndicatorLightOn(): boolean
  • set IsRightIndicatorLightOn(value: boolean): void

IsSearchLightOn

  • get IsSearchLightOn(): boolean
  • set IsSearchLightOn(value: boolean): void

IsSirenActive

  • get IsSirenActive(): boolean
  • set IsSirenActive(value: boolean): void

IsSirenSilent

  • set IsSirenSilent(value: boolean): void

IsStolen

  • get IsStolen(): boolean
  • set IsStolen(value: boolean): void

IsStopped

  • get IsStopped(): boolean

IsStoppedAtTrafficLights

  • get IsStoppedAtTrafficLights(): boolean

IsTaxiLightOn

  • get IsTaxiLightOn(): boolean
  • set IsTaxiLightOn(value: boolean): void

IsUpright

  • get IsUpright(): boolean

IsUpsideDown

  • get IsUpsideDown(): boolean

IsVisible

  • get IsVisible(): boolean
  • set IsVisible(value: boolean): void

IsWanted

  • get IsWanted(): boolean
  • set IsWanted(value: boolean): void

LandingGearState

LightsMultiplier

  • set LightsMultiplier(value: number): void

LockStatus

LodDistance

  • get LodDistance(): number
  • set LodDistance(value: number): void

MaterialCollidingWith

MaxBraking

  • get MaxBraking(): number

MaxHealth

  • get MaxHealth(): number
  • set MaxHealth(amount: number): void

MaxSpeed

  • set MaxSpeed(value: number): void

MaxTraction

  • get MaxTraction(): number

Model

Mods

NeedsToBeHotwired

  • get NeedsToBeHotwired(): boolean
  • set NeedsToBeHotwired(value: boolean): void

NetworkId

  • get NetworkId(): number

NumberPlate

  • get NumberPlate(): string
  • set NumberPlate(value: string): void

Occupants

  • get Occupants(): Ped[]

OilLevel

  • get OilLevel(): number
  • set OilLevel(value: number): void

Opacity

  • get Opacity(): number
  • set Opacity(value: number): void

PassengerCapacity

  • get PassengerCapacity(): number

PassengerCount

  • get PassengerCount(): number

Passengers

  • get Passengers(): Ped[]

PetrolTankHealth

  • get PetrolTankHealth(): number
  • set PetrolTankHealth(value: number): void

Position

PositionNoOffset

  • set PositionNoOffset(position: Vector3): void

PreviouslyOwnedByPlayer

  • get PreviouslyOwnedByPlayer(): boolean
  • set PreviouslyOwnedByPlayer(value: boolean): void

ProvidesCover

  • set ProvidesCover(value: boolean): void

Quaternion

RadioStation

RespotTimer

  • set RespotTimer(time: number): void

RoofState

Rotation

RotationVelocity

Speed

  • get Speed(): number
  • set Speed(value: number): void

State

  • get State(): StateBagInterface

SteeringAngle

  • get SteeringAngle(): number
  • set SteeringAngle(value: number): void

SteeringScale

  • get SteeringScale(): number
  • set SteeringScale(value: number): void

Strong

  • set Strong(toggle: boolean): void

SubmersionLevel

  • get SubmersionLevel(): number

TowedVehicle

TowingCraneRaisedAmount

  • set TowingCraneRaisedAmount(value: number): void

Velocity

WheelSpeed

  • get WheelSpeed(): number

Wheels

Windows

Methods

AddStateBagChangeHandler

  • AddStateBagChangeHandler(keyFilter: null | string, handler: StateBagChangeHandler): number

applyForce

applyForceRelative

attachBlip

attachTo

  • attachTo(entity: Entity, position: Vector3, rotation: Vector3, collisions?: boolean, unk9?: boolean, useSoftPinning?: boolean, rotationOrder?: number): void

attachToBone

  • attachToBone(entityBone: EntityBone, position: Vector3, rotation: Vector3, collisions?: boolean, unk9?: boolean, useSoftPinning?: boolean, rotationOrder?: number): void

clearLastWeaponDamage

  • clearLastWeaponDamage(): void

closeBombBay

  • closeBombBay(): void

deform

  • deform(position: Vector3, damageAmount: number, radius: number): void

delete

  • delete(): void

detach

  • detach(): void

detachFromTowTruck

  • detachFromTowTruck(): void

detachTowedVehicle

  • detachTowedVehicle(): void

exists

  • exists(): boolean

explode

  • explode(): void

explodeNetworked

  • explodeNetworked(): void

extraExists

  • extraExists(extra: number): boolean

getEntityAttachedTo

getOffsetPosition

getPedOnSeat

getPositionOffset

hasBeenDamagedBy

  • hasBeenDamagedBy(entity: Entity): boolean

hasBeenDamagedByAnyMeleeWeapon

  • hasBeenDamagedByAnyMeleeWeapon(): boolean

hasBeenDamagedByAnyWeapon

  • hasBeenDamagedByAnyWeapon(): boolean

hasBeenDamagedByWeapon

  • hasBeenDamagedByWeapon(weapon: WeaponHash): boolean

hasClearLosToEntity

  • hasClearLosToEntity(entity: Entity, traceType?: number): boolean

hasClearLosToEntityInFront

  • hasClearLosToEntityInFront(entity: Entity): boolean

isAlive

  • isAlive(): boolean

isAttached

  • isAttached(): boolean

isAttachedTo

  • isAttachedTo(entity: Entity): boolean

isDead

  • isDead(): boolean

isExtraOn

  • isExtraOn(extra: number): boolean

isInAngledArea

  • isInAngledArea(origin: Vector3, edge: Vector3, angle: number): boolean

isInArea

isInRangeOf

  • isInRangeOf(position: Vector3, range: number): boolean

isNearEntity

isSeatFree

isTouching

  • isTouching(entity: Entity): boolean

isTouchingModel

  • isTouchingModel(model: Model): boolean

listenForStateChange

  • listenForStateChange(keyFilter: null | string, handler: StateBagChangeHandler): number
  • A short hand function for AddStateBagChangeHandler, this gets automatically cleaned up on entity deletion.

    Parameters

    • keyFilter: null | string

      the key to filter for or null

    • handler: StateBagChangeHandler

      the function to handle the change

    Returns number

    a cookie to be used in RemoveStateBagChangeHandler

markAsNoLongerNeeded

  • markAsNoLongerNeeded(): void

openBombBay

  • openBombBay(): void

placeOnGround

  • placeOnGround(): void

removeAllParticleEffects

  • removeAllParticleEffects(): void

removeStateListener

  • removeStateListener(tgtCookie: number): void

repair

  • repair(): void

resetOpacity

  • resetOpacity(): void

setHeliYawPitchRollMult

  • setHeliYawPitchRollMult(mult: number): void

setNoCollision

  • setNoCollision(entity: Entity, toggle: boolean): void

soundHorn

  • soundHorn(duration: number): void

startAlarm

  • startAlarm(): void

toggleExtra

  • toggleExtra(extra: number, toggle: boolean): void

towVehicle

  • towVehicle(vehicle: Vehicle, rear: boolean): void

wash

  • wash(): void

Static exists

Static fromHandle

Static fromNetworkId

Static getClassDisplayName

Static getModelClass

Static getModelDisplayName

  • getModelDisplayName(vehicleModel: Model): string

Generated using TypeDoc