Show / Hide Table of Contents

Class BaseVehicle

Abstract class for client-side vehicles

Inheritance
Object
Element
PhysicalElement
SharedVehicle
BaseVehicle
Boat
Helicopter
Plane
Taxi
Trailer
Train
TurretedVehicle
Vehicle
Inherited Members
SharedVehicle.PrimaryColor
SharedVehicle.SecondaryColor
SharedVehicle.Colors
SharedVehicle.HeadLightColor
SharedVehicle.Name
SharedVehicle.MaxPassengers
SharedVehicle.EngineRunning
SharedVehicle.Handling
SharedVehicle.OverrideLights
SharedVehicle.Paintjob
SharedVehicle.PlateText
SharedVehicle.Sirens
SharedVehicle.VehicleType
SharedVehicle.Upgrades
SharedVehicle.IsBlown
SharedVehicle.DamageProof
SharedVehicle.FuelTankExplodable
SharedVehicle.Locked
SharedVehicle.IsOnGround
SharedVehicle.DoorsUndamagable
SharedVehicle.Variant
SharedVehicle.WheelState
SharedVehicle.VehicleTowedByThis
SharedVehicle.Fix()
SharedVehicle.DetachTowedVehicle(SharedVehicle)
SharedVehicle.DetachAnyTowedVehicle()
SharedVehicle.AddUpgrade(Upgrade)
SharedVehicle.GetCompatibleUpgrades(UpgradeSlot)
SharedVehicle.GetCompatibleUpgrades()
SharedVehicle.GetUpgradeOnSlot(UpgradeSlot)
SharedVehicle.RemoveUpgrade(Upgrade)
SharedVehicle.GetDoorOpenRatio(Door)
SharedVehicle.SetDoorOpenRatio(Door, Single, Int32)
SharedVehicle.GetDoorState(Door)
SharedVehicle.SetDoorState(Door, DoorState)
SharedVehicle.GetLightState(Light)
SharedVehicle.SetLightState(Light, LightState)
SharedVehicle.GetPanelDamage(Panel)
SharedVehicle.SetPanelDamage(Panel, DamageLevel)
PhysicalElement.Dimension
PhysicalElement.Interior
PhysicalElement.Frozen
PhysicalElement.Alpha
PhysicalElement.Health
PhysicalElement.Model
PhysicalElement.CollisionShape
PhysicalElement.CollisionsEnabled
PhysicalElement.LowLODElement
PhysicalElement.DoubleSided
PhysicalElement.IsInWater
PhysicalElement.IsLowLOD
PhysicalElement.Position
PhysicalElement.Rotation
PhysicalElement.QuaternionRotation
PhysicalElement.Matrix
PhysicalElement.ForwardVector
PhysicalElement.RightVector
PhysicalElement.UpVector
PhysicalElement.Velocity
PhysicalElement.AngularVelocity
PhysicalElement.AngularQuaternionVelocity
PhysicalElement.ToAttached
PhysicalElement.IsAttached
PhysicalElement.IsWithinCollisionShape(CollisionShape)
PhysicalElement.IsWithinMarker(SharedMarker)
PhysicalElement.AttachTo(PhysicalElement, Matrix4x4)
PhysicalElement.AttachTo(PhysicalElement, Vector3, Vector3)
PhysicalElement.AttachTo(PhysicalElement, Vector3, Quaternion)
PhysicalElement.AttachTo(PhysicalElement)
PhysicalElement.Detach()
PhysicalElement.Offset
PhysicalElement.GetWithinRange(Vector3, Single, String)
PhysicalElement.FaceElement(PhysicalElement)
PhysicalElement.OnClicked
PhysicalElement.OnModelChange
PhysicalElement.OnStartSync
PhysicalElement.OnStopSync
PhysicalElement.OnStreamIn
PhysicalElement.OnStreamOut
Element.element
Element.Root
Element.MTAElement
Element.Type
Element.ID
Element.Exists
Element.ChildCount
Element.Parent
Element.CallPropagationEnabled
Element.SetData(String, Object, Boolean)
Element.GetData(String, Boolean)
Element.TryGetData(String, Object, Boolean)
Element.GetData<T>(String, Boolean)
Element.TryGetData<T>(String, T, Boolean)
Element.Destroy()
Element.GetChild(Int32)
Element.GetChildren(String)
Element.GetByID(String, Int32)
Element.ListenForEvent(String, Boolean, String)
Element.HandleEvent(String, MtaElement, Object, Object, Object, Object, Object, Object, Object, Object)
Element.OnDestroy
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Client.Vehicles
Assembly: SlipeClient.dll
Syntax
public class BaseVehicle : SharedVehicle

Constructors

| Improve this Doc View Source

BaseVehicle(VehicleModel, Vector3, Vector3, String, Int32, Int32)

Create a vehicle using all createVehicle arguments

Declaration
protected BaseVehicle(VehicleModel model, Vector3 position, Vector3 rotation, string numberplate = "", int variant1 = 1, int variant2 = 1)
Parameters
Type Name Description
VehicleModel model
Vector3 position
Vector3 rotation
String numberplate
Int32 variant1
Int32 variant2

Properties

| Improve this Doc View Source

AdjustableProperty

Get and set the adjustable property (hydra jet, dozer front etc.)

Declaration
public int AdjustableProperty { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Components

Get an array of all the vehicle's components

Declaration
public Component[] Components { get; }
Property Value
Type Description
Component[]
| Improve this Doc View Source

Controler

Get the player controlling the vehicle in the drivers seat

Declaration
public Player Controler { get; }
Property Value
Type Description
Player
| Improve this Doc View Source

CurrentGear

Get the current gear of this vehicle

Declaration
public int CurrentGear { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Gravity

Get and set the direction in which the vehicle falls, also the cameras of any passengers will be rotated to match it.

Declaration
public Vector3 Gravity { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

IsNitroRecharging

Get if the vehicle nitro is recharging

Declaration
public bool IsNitroRecharging { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

NitroActivated

Get and set if the nitro is currently actived

Declaration
public bool NitroActivated { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

NitroCount

Get and set the nitro count

Declaration
public int NitroCount { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

NitroLevel

Get and set the level of nitro

Declaration
public float NitroLevel { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

Occupants

Get a dictionary of players occupying this vehicle

Declaration
public Dictionary<Seat, Player> Occupants { get; }
Property Value
Type Description
Dictionary<Seat, Player>

Methods

| Improve this Doc View Source

Blow()

Blow up this vehicle

Declaration
public bool Blow()
Returns
Type Description
Boolean
| Improve this Doc View Source

GetComponent(ComponentType, ComponentBase)

Get a specific component of this vehicle

Declaration
public Component GetComponent(ComponentType type, ComponentBase relativeTo = ComponentBase.root)
Parameters
Type Name Description
ComponentType type
ComponentBase relativeTo
Returns
Type Description
Component
| Improve this Doc View Source

GetOccupant(Seat)

This function gets the player sitting/trying to enter this vehicle.

Declaration
public Player GetOccupant(Seat seat = Seat.FrontLeft)
Parameters
Type Name Description
Seat seat
Returns
Type Description
Player
| Improve this Doc View Source

IsWheelOnGround(Wheel)

Check if a wheel is touching the ground

Declaration
public bool IsWheelOnGround(Wheel wheel)
Parameters
Type Name Description
Wheel wheel
Returns
Type Description
Boolean
| Improve this Doc View Source

isWindowOpen(Window)

Check if a window is open

Declaration
public bool isWindowOpen(Window window)
Parameters
Type Name Description
Window window
Returns
Type Description
Boolean
| Improve this Doc View Source

SetWindowOpen(Window, Boolean)

This function sets the vehicle window state.

Declaration
public bool SetWindowOpen(Window window, bool open)
Parameters
Type Name Description
Window window
Boolean open
Returns
Type Description
Boolean

Events

| Improve this Doc View Source

OnCollision

Declaration
public event BaseVehicle.OnCollisionHandler OnCollision
Event Type
Type Description
BaseVehicle.OnCollisionHandler
| Improve this Doc View Source

OnCollisionShapeHit

Declaration
public event BaseVehicle.OnCollisionShapeHitHandler OnCollisionShapeHit
Event Type
Type Description
BaseVehicle.OnCollisionShapeHitHandler
| Improve this Doc View Source

OnCollisionShapeLeave

Declaration
public event BaseVehicle.OnCollisionShapeLeaveHandler OnCollisionShapeLeave
Event Type
Type Description
BaseVehicle.OnCollisionShapeLeaveHandler
| Improve this Doc View Source

OnDamage

Declaration
public event BaseVehicle.OnDamageHandler OnDamage
Event Type
Type Description
BaseVehicle.OnDamageHandler
| Improve this Doc View Source

OnEnter

Declaration
public event BaseVehicle.OnEnterHandler OnEnter
Event Type
Type Description
BaseVehicle.OnEnterHandler
| Improve this Doc View Source

OnExit

Declaration
public event BaseVehicle.OnExitHandler OnExit
Event Type
Type Description
BaseVehicle.OnExitHandler
| Improve this Doc View Source

OnExplode

Declaration
public event BaseVehicle.OnExplodeHandler OnExplode
Event Type
Type Description
BaseVehicle.OnExplodeHandler
| Improve this Doc View Source

OnExplosion

Declaration
public event BaseVehicle.OnExplosionHandler OnExplosion
Event Type
Type Description
BaseVehicle.OnExplosionHandler
| Improve this Doc View Source

OnNitroStateChange

Declaration
public event BaseVehicle.OnNitroStateChangeHandler OnNitroStateChange
Event Type
Type Description
BaseVehicle.OnNitroStateChangeHandler
| Improve this Doc View Source

OnRespawn

Declaration
public event BaseVehicle.OnRespawnHandler OnRespawn
Event Type
Type Description
BaseVehicle.OnRespawnHandler
| Improve this Doc View Source

OnStartEnter

Declaration
public event BaseVehicle.OnStartEnterHandler OnStartEnter
Event Type
Type Description
BaseVehicle.OnStartEnterHandler
| Improve this Doc View Source

OnStartExit

Declaration
public event BaseVehicle.OnStartExitHandler OnStartExit
Event Type
Type Description
BaseVehicle.OnStartExitHandler
| Improve this Doc View Source

OnWeaponHit

Declaration
public event BaseVehicle.OnWeaponHitHandler OnWeaponHit
Event Type
Type Description
BaseVehicle.OnWeaponHitHandler
| Improve this Doc View Source

OnWorldSound

Declaration
public event BaseVehicle.OnWorldSoundHandler OnWorldSound
Event Type
Type Description
BaseVehicle.OnWorldSoundHandler

Extension Methods

ElementExtensions.GetBoundingBox(PhysicalElement)
ElementExtensions.GetDistanceFromCentreOfMassToBaseOfModel(PhysicalElement)
ElementExtensions.GetRadius(PhysicalElement)
ElementExtensions.SetCollidableWith(PhysicalElement, PhysicalElement, Boolean)
ElementExtensions.IsCollidableWith(PhysicalElement, PhysicalElement)
ElementExtensions.IsLocal(PhysicalElement)
ElementExtensions.IsOnScreen(PhysicalElement)
ElementExtensions.SetStreamable(PhysicalElement, Boolean)
ElementExtensions.IsStreamable(PhysicalElement)
ElementExtensions.IsStreamedIn(PhysicalElement)
ElementExtensions.IsSyncer(PhysicalElement)
ElementExtensions.IsWaitingForGroundToLoad(PhysicalElement)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX