Show / Hide Table of Contents

Class SharedVehicle

Represents a vehicle in the GTA world

Inheritance
Object
Element
PhysicalElement
SharedVehicle
Inherited Members
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.Shared.Vehicles
Assembly: SlipeShared.dll
Syntax
public class SharedVehicle : PhysicalElement

Properties

| Improve this Doc View Source

Colors

Get and set all the colors of this vehicle

Declaration
public Color[] Colors { get; set; }
Property Value
Type Description
Color[]
| Improve this Doc View Source

DamageProof

Makes a vehicle damage proof, so it won't take damage from bullets, hits, explosions or fire. A damage proof's vehicle health can still be changed via script.

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

DoorsUndamagable

This function makes a vehicle's doors undamageable, so they won't fall off when they're hit.

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

EngineRunning

Get and set if the engine of this vehicle is running

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

FuelTankExplodable

Get and set if the fuel tank is explodable

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

Handling

Get the vehicle handling of the current vehicle

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

HeadLightColor

Get and set the headlight color of this vehicle

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

IsBlown

Get if this vehicle is blown up

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

IsOnGround

Get if the vehicle is touching the ground

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

Locked

Get and set if the vehicle is locked

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

MaxPassengers

Get the max amount of passengers this vehicle can have (excluding driver seat)

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

Name

Get the name of this vehicle

Declaration
public string Name { get; }
Property Value
Type Description
String
| Improve this Doc View Source

OverrideLights

Get and set the override-lights setting

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

Paintjob

Get and set the paintjob

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

PlateText

Get and set the numberplate text

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

PrimaryColor

Get and set the primary color of this vehicle

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

SecondaryColor

Get and set the secondary color of this vehicle

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

Sirens

The sirens of this vehicle

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

Upgrades

Get a dictionary with the ugprades of upgraded slots

Declaration
public Dictionary<UpgradeSlot, Upgrade> Upgrades { get; }
Property Value
Type Description
Dictionary<UpgradeSlot, Upgrade>
| Improve this Doc View Source

Variant

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

Declaration
public Tuple<int, int> Variant { get; }
Property Value
Type Description
Tuple<Int32, Int32>
| Improve this Doc View Source

VehicleTowedByThis

Get the vehicle (trailer or regular vehicle) being towed by this vehicle

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

VehicleType

Get a string representation of the type of this vehicle

Declaration
public string VehicleType { get; }
Property Value
Type Description
String
| Improve this Doc View Source

WheelState

Get and set the state of all wheels (front left, rear left, front right, rear right)

Declaration
public Tuple<WheelState, WheelState, WheelState, WheelState> WheelState { get; set; }
Property Value
Type Description
Tuple<WheelState, WheelState, WheelState, WheelState>

Methods

| Improve this Doc View Source

AddUpgrade(Upgrade)

Adds a vehicle upgrade to this vehicle

Declaration
public bool AddUpgrade(Upgrade upgrade)
Parameters
Type Name Description
Upgrade upgrade
Returns
Type Description
Boolean
| Improve this Doc View Source

DetachAnyTowedVehicle()

Detach all vehicles that are towed by this vehicle

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

DetachTowedVehicle(SharedVehicle)

Detach a towed vehicle if any

Declaration
public bool DetachTowedVehicle(SharedVehicle attachedVehicle)
Parameters
Type Name Description
SharedVehicle attachedVehicle
Returns
Type Description
Boolean
| Improve this Doc View Source

Fix()

This function will set a vehicle's health to full and fix its damage model. If you wish to only change the vehicle's health, without affecting its damage model, use Health.

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

GetCompatibleUpgrades()

Get all compatible upgrades for this vehicle

Declaration
public Upgrade[] GetCompatibleUpgrades()
Returns
Type Description
Upgrade[]
| Improve this Doc View Source

GetCompatibleUpgrades(UpgradeSlot)

Get compatible upgrades for a specific upgrade slot

Declaration
public Upgrade[] GetCompatibleUpgrades(UpgradeSlot slot)
Parameters
Type Name Description
UpgradeSlot slot
Returns
Type Description
Upgrade[]
| Improve this Doc View Source

GetDoorOpenRatio(Door)

This function tells you how open a door is (the 'open ratio').

Declaration
public float GetDoorOpenRatio(Door door)
Parameters
Type Name Description
Door door
Returns
Type Description
Single
| Improve this Doc View Source

GetDoorState(Door)

This function returns the current state of the specifed door on this vehicle.

Declaration
public DoorState GetDoorState(Door door)
Parameters
Type Name Description
Door door
Returns
Type Description
DoorState
| Improve this Doc View Source

GetLightState(Light)

This function returns the current state of the specifed light on this vehicle.

Declaration
public LightState GetLightState(Light light)
Parameters
Type Name Description
Light light
Returns
Type Description
LightState
| Improve this Doc View Source

GetPanelDamage(Panel)

Get the damage status of a particular vehicle panel

Declaration
public DamageLevel GetPanelDamage(Panel panel)
Parameters
Type Name Description
Panel panel
Returns
Type Description
DamageLevel
| Improve this Doc View Source

GetUpgradeOnSlot(UpgradeSlot)

This function returns the current upgrade id on the vehicle's 'upgrade slot'

Declaration
public Upgrade GetUpgradeOnSlot(UpgradeSlot slot)
Parameters
Type Name Description
UpgradeSlot slot
Returns
Type Description
Upgrade
| Improve this Doc View Source

RemoveUpgrade(Upgrade)

This function removes an already existing upgrade from the specified vehicle, eg: nos, hydraulics.

Declaration
public bool RemoveUpgrade(Upgrade upgrade)
Parameters
Type Name Description
Upgrade upgrade
Returns
Type Description
Boolean
| Improve this Doc View Source

SetDoorOpenRatio(Door, Single, Int32)

This function sets how much a vehicle's door is open.

Declaration
public bool SetDoorOpenRatio(Door door, float ratio, int time = 0)
Parameters
Type Name Description
Door door
Single ratio
Int32 time
Returns
Type Description
Boolean
| Improve this Doc View Source

SetDoorState(Door, DoorState)

This function sets the state of the specified door on the vehicle.

Declaration
public bool SetDoorState(Door door, DoorState state)
Parameters
Type Name Description
Door door
DoorState state
Returns
Type Description
Boolean
| Improve this Doc View Source

SetLightState(Light, LightState)

This function sets the state of the specified light on the vehicle.

Declaration
public bool SetLightState(Light light, LightState state)
Parameters
Type Name Description
Light light
LightState state
Returns
Type Description
Boolean
| Improve this Doc View Source

SetPanelDamage(Panel, DamageLevel)

Set the damage status of a particular vehicle panel

Declaration
public bool SetPanelDamage(Panel panel, DamageLevel damage)
Parameters
Type Name Description
Panel panel
DamageLevel damage
Returns
Type Description
Boolean
  • Improve this Doc
  • View Source
Back to top Generated by DocFX