BaseVehicle Class |
Namespace: SampSharp.GameMode.World
public class BaseVehicle : IdentifiedPool<BaseVehicle>, IWorldObject
The BaseVehicle type exposes the following members.
Name | Description | |
---|---|---|
BaseVehicle | Initializes a new instance of the BaseVehicle class |
Name | Description | |
---|---|---|
Alarm |
Gets or sets this BaseVehicle's alarm state. If True the alarm is (or was) sounding.
| |
Angle |
Gets or sets the Z angle of this BaseVehicle.
| |
Bonnet |
Gets or sets the bonnet/hood status of this BaseVehicle. If True, it's open.
| |
Boot |
Gets or sets the boot/trunk status of this BaseVehicle. True means it is open.
| |
Doors |
Gets or sets the lock status of the doors of this BaseVehicle. If True the doors are locked.
| |
Driver |
Gets the driver of this BaseVehicle.
| |
Engine |
Gets or sets this BaseVehicle's engine status. If True, the engine is running.
| |
HasTrailer |
Gets whether this BaseVehicle has a trailer attached to it.
| |
Health |
Gets or sets the health of this BaseVehicle.
| |
Id |
Gets the identifier of this instance.
(Inherited from IdentifiedPoolTInstance.) | |
IsBackLeftDoorOpen |
Gets or sets a value indicating whether the driver door is open.
| |
IsBackLeftWindowClosed |
Gets or sets a value indicating whether the driver window is closed.
| |
IsBackRightDoorOpen |
Gets or sets a value indicating whether the driver door is open.
| |
IsBackRightWindowClosed |
Gets or sets a value indicating whether the driver window is closed.
| |
IsDisposed |
Gets whether this resource has been disposed.
(Inherited from Disposable.) | |
IsDriverDoorOpen |
Gets or sets a value indicating whether the driver door is open.
| |
IsDriverWindowClosed |
Gets or sets a value indicating whether the driver window is closed.
| |
IsPassengerDoorOpen |
Gets or sets a value indicating whether the passenger door is open.
| |
IsPassengerWindowClosed |
Gets or sets a value indicating whether the passenger window is closed.
| |
IsSirenOn |
Gets a value indicating whether this Vehicle's siren is on.
| |
IsValid |
Gets whether this BaseVehicle has been created and still is alive.
| |
Lights |
Gets or sets this BaseVehicle's lights' state. If True the lights are on.
| |
Model |
Gets the model ID of this BaseVehicle.
| |
ModelInfo |
Gets an instance of VehicleModelInfo about this BaseVehicle.
| |
Objective |
Gets or sets the objective status of this BaseVehicle. True means the objective is on.
| |
Passengers |
Gets the passengers of this BaseVehicle. (not the driver)
| |
PoolSize |
Gets the size of the vehicles pool.
| |
Position |
Gets or sets the position of this BaseVehicle.
| |
Rotation |
Gets or sets the rotation of this BaseVehicle.
| |
Trailer |
Gets or sets the the trailer attached to this BaseVehicle.
| |
Velocity |
Gets or sets the velocity at which this BaseVehicle is moving.
| |
VirtualWorld |
Gets or sets the virtual world of this BaseVehicle.
|
Name | Description | |
---|---|---|
AddComponent |
Adds a 'component' (often referred to as a 'mod' (modification)) to this Vehicle.
| |
AssertNotDisposed |
Checks whether this instance has been disposed. If it has, it throws an exception.
(Inherited from Disposable.) | |
ChangeColor |
Change this BaseVehicle's primary and secondary colors.
| |
ChangePaintjob |
Change this BaseVehicle's paintjob (for plain colors see ChangeColor(Int32, Int32)).
| |
Create |
Creates a BaseVehicle in the world.
| |
CreateStatic(VehicleModelType, Vector3, Single, Int32, Int32) |
Creates a static BaseVehicle in the world.
| |
CreateStatic(VehicleModelType, Vector3, Single, Int32, Int32, Int32, Boolean) |
Creates a static BaseVehicle in the world.
| |
Dispose |
Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Disposable.) | |
Dispose(Boolean) |
Removes this instance from the pool.
(Overrides IdentifiedPoolTInstanceDispose(Boolean).) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize |
Finalizes an instance of the Disposable class.
(Inherited from Disposable.) | |
GetComponentInSlot |
Retrieves the installed component ID from this BaseVehicle in a specific slot.
| |
GetComponentType |
Find out what type of component a certain ID is.
| |
GetDamageStatus |
Retrieve the damage statuses of this BaseVehicle.
| |
GetDistanceFromPoint |
This function can be used to calculate the distance (as a float) between this BaseVehicle and
another
map coordinate.
This can be useful to detect how far a vehicle away is from a location.
| |
GetDoorsParameters(Boolean, Boolean, Boolean, Boolean) |
Gets the doors parameters.
| |
GetDoorsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue) |
Gets the doors parameters.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetModelInfo |
Retrieve information about a specific vehicle model such as the size or position of seats.
| |
GetParameters(Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean) |
Gets this BaseVehicle's parameters.
| |
GetParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue) |
Gets this BaseVehicle's parameters.
| |
GetRotationQuat |
Returns this BaseVehicle's rotation on all axis as a quaternion.
| |
GetRotationQuat(Single, Single, Single, Single) |
Returns this BaseVehicle's rotation on all axis as a quaternion.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetWindowsParameters(Boolean, Boolean, Boolean, Boolean) |
Gets the windows parameters.
| |
GetWindowsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue) |
Gets the windows parameters.
| |
Initialize |
An overloadable point for initialization logic which requires the Id to be set.
(Inherited from IdentifiedPoolTInstance.) | |
IsStreamedIn |
Checks if this BaseVehicle is streamed in for a BasePlayer.
| |
LinkToInterior |
Links this BaseVehicle to the interior. This can be used for example for an arena/stadium.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDamageStatusUpdated |
Raises the DamageStatusUpdated event.
| |
OnDeath |
Raises the Died event.
| |
OnMod |
Raises the Mod event.
| |
OnPaintjobApplied |
Raises the PaintjobApplied event.
| |
OnPlayerEnter |
Raises the PlayerEnter event.
| |
OnPlayerExit |
Raises the PlayerExit event.
| |
OnResprayed |
Raises the Resprayed event.
| |
OnSirenStateChanged |
Raises the SirenStateChanged event.
| |
OnSpawn |
Raises the Spawn event.
| |
OnStreamIn |
Raises the StreamIn event.
| |
OnStreamOut |
Raises the StreamOut event.
| |
OnTrailerUpdate |
Raises the TrailerUpdate event.
| |
OnUnoccupiedUpdate |
Raises the UnoccupiedUpdate event.
| |
RemoveComponent |
Remove a component from the BaseVehicle.
| |
Repair |
Fully repairs this BaseVehicle, including visual damage (bumps, dents, scratches, popped tires
etc.).
| |
Respawn |
Sets this BaseVehicle back to the position at where it was created.
| |
SetAngularVelocity |
Sets the angular velocity of this BaseVehicle.
| |
SetDoorsParameters(Boolean, Boolean, Boolean, Boolean) |
Sets the doors parameters.
| |
SetDoorsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue) |
Sets the doors parameters.
| |
SetNumberPlate |
Set this BaseVehicle's numberplate, which supports olor embedding.
| |
SetParameters(Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean) |
Sets this BaseVehicle's parameters for all players.
| |
SetParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue) |
Sets this BaseVehicle's parameters for all players.
| |
SetParametersForPlayer |
Set the parameters of this BaseVehicle for a BasePlayer.
| |
SetWindowsParameters(Boolean, Boolean, Boolean, Boolean) |
Sets the windows parameters.
| |
SetWindowsParameters(VehicleParameterValue, VehicleParameterValue, VehicleParameterValue, VehicleParameterValue) |
Sets the windows parameters.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UpdateDamageStatus |
Sets the various visual damage statuses of this BaseVehicle, such as popped tires, broken lights and
damaged panels.
|
Name | Description | |
---|---|---|
DamageStatusUpdated |
Occurs when the OnDamageStatusUpdated(PlayerEventArgs) is being called.
This callback is called when a element of this BaseVehicle such as doors, tires, panels, or lights
get damaged.
| |
Died |
Occurs when the OnDeath(PlayerEventArgs) is being called.
This callback is called when this BaseVehicle is destroyed - either by exploding or becoming
submerged in water.
| |
Disposed |
Occurs when this isntance has been disposed.
(Inherited from Disposable.) | |
Mod |
Occurs when the OnMod(VehicleModEventArgs) is being called.
This callback is called when this BaseVehicle is modded.
| |
PaintjobApplied |
Occurs when the OnPaintjobApplied(VehiclePaintjobEventArgs) is being called.
Called when a BasePlayer changes the paintjob of this BaseVehicle (in a modshop).
| |
PlayerEnter |
Occurs when the OnPlayerEnter(EnterVehicleEventArgs) is being called.
This callback is called when a BasePlayer starts to enter this BaseVehicle,
meaning the player is not in vehicle yet at the time this callback is called.
| |
PlayerExit |
Occurs when the OnPlayerExit(PlayerVehicleEventArgs) is being called.
This callback is called when a BasePlayer exits a BaseVehicle.
| |
Resprayed |
Occurs when the OnResprayed(VehicleResprayedEventArgs) is being called.
The callback name is deceptive, this callback is called when a BasePlayer exits a mod shop with this
BaseVehicle,
regardless of whether the vehicle's colors were changed, and is NEVER called for pay 'n' spray garages.
| |
SirenStateChanged |
Occurs when the OnSirenStateChanged(SirenStateEventArgs) is being called.
This callback is called when this BaseVehicle's siren is toggled.
| |
Spawn |
Occurs when the OnSpawn(EventArgs) is being called.
This callback is called when BaseVehicle spawns.
| |
StreamIn |
Occurs when the OnStreamIn(PlayerEventArgs) is being called.
Called when a BaseVehicle is streamed to a BasePlayer's client.
| |
StreamOut |
Occurs when the OnStreamOut(PlayerEventArgs) is being called.
This callback is called when a BaseVehicle is streamed out from some BasePlayer's
client.
| |
TrailerUpdate |
Occurs when the OnTrailerUpdate(TrailerEventArgs) is being called.
This callback is called when a BasePlayer sent a trailer update about this
BaseVehicle.
| |
UnoccupiedUpdate |
Occurs when the OnUnoccupiedUpdate(UnoccupiedVehicleEventArgs) is being called.
This callback is called everytime this BaseVehicle updates the server with their status while it is
unoccupied.
|
Name | Description | |
---|---|---|
InvalidId |
Identifier indicating the handle is invalid.
| |
Max |
Maximum number of vehicles which can exist.
|