Click or drag to resize

Vehicle Class

Represents a component which provides the data and functionality of a vehicle.
Inheritance Hierarchy

Namespace:  SampSharp.Entities.SAMP
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public sealed class Vehicle : Component

The Vehicle type exposes the following members.

Properties
  NameDescription
Public propertyAlarm
Gets or sets this vehicle's alarm state. If True the alarm is (or was) sounding.
Public propertyAngle
Gets or sets the Z angle of this vehicle.
Public propertyBonnet
Gets or sets the bonnet/hood status of this vehicle. If True, it's open.
Public propertyBoot
Gets or sets the boot/trunk status of this vehicle. True means it is open.
Public propertyDoors
Gets or sets the lock status of the doors of this vehicle. If True the doors are locked.
Public propertyEngine
Gets or sets this vehicle's engine status. If True, the engine is running.
Public propertyEntity
Gets the entity to which this component has been attached.
(Inherited from Component.)
Public propertyHasTrailer
Gets whether this vehicle has a trailer attached to it.
Public propertyHealth
Gets or sets the health of this vehicle.
Public propertyIsBackLeftDoorOpen
Gets or sets a value indicating whether the driver door is open.
Public propertyIsBackLeftWindowClosed
Gets or sets a value indicating whether the driver window is closed.
Public propertyIsBackRightDoorOpen
Gets or sets a value indicating whether the driver door is open.
Public propertyIsBackRightWindowClosed
Gets or sets a value indicating whether the driver window is closed.
Public propertyIsComponentAlive
Gets a value indicating whether this component is alive (has not been destroyed).
(Inherited from Component.)
Public propertyIsDriverDoorOpen
Gets or sets a value indicating whether the driver door is open.
Public propertyIsDriverWindowClosed
Gets or sets a value indicating whether the driver window is closed.
Public propertyIsPassengerDoorOpen
Gets or sets a value indicating whether the passenger door is open.
Public propertyIsPassengerWindowClosed
Gets or sets a value indicating whether the passenger window is closed.
Public propertyIsSirenOn
Gets a value indicating whether this Vehicle's siren is on.
Public propertyLights
Gets or sets this vehicle's lights' state. If True the lights are on.
Public propertyModel
Gets the model ID of this vehicle.
Public propertyObjective
Gets or sets the objective status of this vehicle. True means the objective is on.
Public propertyParent
Gets the parent entity of the entity to which this component has been attached.
(Inherited from Component.)
Public propertyPosition
Gets or sets the position of this vehicle.
Public propertyRotation
Gets or sets the rotation of this vehicle.
Public propertyRotationQuaternion
Gets this vehicle's rotation on all axis as a quaternion.
Public propertyTrailer
Gets or sets the the trailer attached to this vehicle.
Public propertyVelocity
Gets or sets the velocity at which this vehicle is moving.
Public propertyVirtualWorld
Gets or sets the virtual world of this vehicle.
Top
Methods
  NameDescription
Public methodAddComponent(Int32)
Adds a 'component' (often referred to as a 'mod' (modification)) to this Vehicle.
Public methodAddComponentT
Adds a component of the specified type T to the entity.
(Inherited from Component.)
Public methodAddComponentT(Object)
Adds a component of the specified type T to the entity with the specified constructor args.
(Inherited from Component.)
Public methodChangeColor
Change this vehicle's primary and secondary colors.
Public methodChangePaintjob
Change this vehicle's paintjob (for plain colors see ChangeColor(Int32, Int32)).
Public methodDestroy
Destroys this component.
(Inherited from Component.)
Public methodDestroyComponentsT
Destroys the components of the specified type T attached to the entity.
(Inherited from Component.)
Public methodDestroyEntity
Destroys the entity.
(Inherited from Component.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetComponentT
Gets a component of the specified type T attached to the entity.
(Inherited from Component.)
Public methodGetComponentInChildrenT
Gets a component of the specified type T attached to a child entity of the entity using a depth first search.
(Inherited from Component.)
Public methodGetComponentInParentT
Gets a component of the specified type T attached to a parent entity of the entity.
(Inherited from Component.)
Public methodGetComponentInSlot
Retrieves the installed component ID from this vehicle in a specific slot.
Public methodGetComponentsT
Gets all components of the specified type T attached to the entity.
(Inherited from Component.)
Public methodGetComponentsInChildrenT
Gets all components of the specified type T attached to a child entity of the entity.
(Inherited from Component.)
Public methodGetComponentsInParentT
Gets all components of the specified type T attached to a parent entity of the entity.
(Inherited from Component.)
Public methodGetDamageStatus
Retrieve the damage statuses of this vehicle.
Public methodGetDistanceFromPoint
This function can be used to calculate the distance (as a float) between this vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location.
Public methodGetDoorsParameters(Boolean, Boolean, Boolean, Boolean)
Gets the doors parameters.
Public methodGetDoorsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue)
Gets the doors parameters.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetParameters(Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
Gets this vehicle's parameters.
Public methodGetParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue)
Gets this vehicle's parameters.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetWindowsParameters(Boolean, Boolean, Boolean, Boolean)
Gets the windows parameters.
Public methodGetWindowsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue)
Gets the windows parameters.
Public methodIsStreamedIn
Checks if this vehicle is streamed in for the specified player.
Public methodLinkToInterior
Links this vehicle to the interior. This can be used for example for an arena/stadium.
Public methodRemoveComponent
Remove a component from the vehicle.
Public methodRepair
Fully repairs this vehicle, including visual damage (bumps, dents, scratches, popped tires etc.).
Public methodRespawn
Sets this vehicle back to the position at where it was created.
Public methodSetAngularVelocity
Sets the angular velocity of this vehicle.
Public methodSetDoorsParameters(Boolean, Boolean, Boolean, Boolean)
Sets the doors parameters.
Public methodSetDoorsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue)
Sets the doors parameters.
Public methodSetNumberPlate
Set this vehicle's numberplate, which supports color embedding.
Public methodSetParameters(Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
Sets this vehicle's parameters for all players.
Public methodSetParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue)
Sets this vehicle's parameters for all players.
Public methodSetParametersForPlayer
Set the parameters of this vehicle for a player.
Public methodSetWindowsParameters(Boolean, Boolean, Boolean, Boolean)
Sets the windows parameters.
Public methodSetWindowsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue)
Sets the windows parameters.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateDamageStatus
Sets the various visual damage statuses of this vehicle, such as popped tires, broken lights and damaged panels.
Top
See Also