Show / Hide Table of Contents

Class BaseVehicle

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.VehicleType
SharedVehicle.Upgrades
SharedVehicle.IsBlown
SharedVehicle.DamageProof
SharedVehicle.FuelTankExplodable
SharedVehicle.Locked
SharedVehicle.IsOnGround
SharedVehicle.DoorsUndamagable
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.Server.Vehicles
Assembly: SlipeServer.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

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

IdleRespawnDelay

Set the respawn delay in milliseconds

Declaration
public int IdleRespawnDelay { set; }
Property Value
Type Description
Int32
| 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>
| Improve this Doc View Source

RespawnDelay

Set the respawn delay of this vehicle in milliseconds

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

RespawnEnabled

Set to true to have the vehicle respawn if it gets blown up

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

RespawnPosition

Get and set the respawn position

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

RespawnRotation

Get and set the respawn rotation

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

Sirens

The sirens of this vehicle

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

Variant

Get and set the integers reprsenting the current variant. Check wiki for more info

Declaration
public Tuple<int, int> Variant { get; set; }
Property Value
Type Description
Tuple<Int32, Int32>

Methods

| Improve this Doc View Source

Blow(Boolean)

Blow up this vehicle

Declaration
public bool Blow(bool explode = true)
Parameters
Type Name Description
Boolean explode
Returns
Type Description
Boolean
| 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

ResetExplosionTime()

Resets the vehicle explosion time. This is the point in time at which the vehicle last exploded: at this time plus the vehicle's respawn delay, the vehicle is respawned. You can use this function to prevent the vehicle from respawning.

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

ResetIdleTime()

Resets the vehicle idle time

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

Respawn()

Respawns the vehicle

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

Spawn(Vector3)

Spawns the vehicle at a different position

Declaration
public bool Spawn(Vector3 position)
Parameters
Type Name Description
Vector3 position
Returns
Type Description
Boolean
| Improve this Doc View Source

Spawn(Vector3, Vector3)

Spawns the vehicle at a different position and rotation

Declaration
public bool Spawn(Vector3 position, Vector3 rotation)
Parameters
Type Name Description
Vector3 position
Vector3 rotation
Returns
Type Description
Boolean

Events

| 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

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

Extension Methods

ElementExtensions.SetVisibleTo(Element, Element, Boolean)
ElementExtensions.ClearVisibleTo(Element)
ElementExtensions.IsVisibleTo(Element, Element)
ElementExtensions.Clone(Element, Vector3)
ElementExtensions.GetZoneName(PhysicalElement, Boolean)
ElementExtensions.GetSyncer(PhysicalElement)
ElementExtensions.SetSyncer(PhysicalElement, Player)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX