GetVehicleAttribute()

Syntax

Result.f = GetVehicleAttribute(#Entity, Attribute, Wheel)
Description
Get the specified attribute of the given vehicle entity.

Parameters

#Entity The vehicle entity to use.
Attribute The attribute to get. The following attributes are available:
  #PB_Vehicle_Friction: get the wheel friction value (see CreateVehicleBody() for more info).
  #PB_Vehicle_MaxSuspensionForce: get the wheel maximum suspension force value (see CreateVehicleBody() for more info).
  #PB_Vehicle_SuspensionStiffness: get the stiffness value for the suspension (see CreateVehicleBody() for more info).
  #PB_Vehicle_MaxSuspensionCompression: get the wheel maximum suspension compression value (see CreateVehicleBody() for more info).
  #PB_Vehicle_MaxSuspensionLength: get the maximum length of the suspension (meters).
  #PB_Vehicle_WheelDampingCompression: get the wheel damping compression value.
  #PB_Vehicle_WheelDampingRelaxation: get the wheel damping relaxation value.
  #PB_Vehicle_RollInfluence: get the wheel roll influence value (see AddVehicleWheel() for more info).
  #PB_Vehicle_IsInContact: return #True if the vehicule is in contact with another object, #False otherwise.
  #PB_Vehicle_CurrentSpeedKmHour: get the current vehicule speed in Km/Hour.
  #PB_Vehicle_ContactPointX: get the X contact point coordinate.
  #PB_Vehicle_ContactPointY: get the Y contact point coordinate.
  #PB_Vehicle_ContactPointZ: get the Z contact point coordinate.
  #PB_Vehicle_ContactPointNormalX: get the X normal value of the contact point.
  #PB_Vehicle_ContactPointNormalY: get the Y normal value of the contact point.
  #PB_Vehicle_ContactPointNormalZ: get the Z normal value of the contact point.
  #PB_Vehicle_ForwardVectorX: get the X forward vector value of the contact point.
  #PB_Vehicle_ForwardVectorY: get the Y forward vector value of the contact point.
  #PB_Vehicle_ForwardVectorZ: get the Z forward vector value of the contact point.
Wheel The wheel index, starting from 0.

Return value

Returns the value of the specified attribute or 0 if the vehicle does not support the attribute.

See Also

SetVehicleAttribute()

Supported OS

All

<- CreateVehicleBody() - Vehicle Index - SetVehicleAttribute() ->