Class SharedVehicle
Represents a vehicle in the GTA world
Inheritance
SharedVehicle
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
|
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
|
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
|
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
|
Improve this Doc
View Source
FuelTankExplodable
Get and set if the fuel tank is explodable
Declaration
public bool FuelTankExplodable { get; set; }
Property Value
|
Improve this Doc
View Source
Handling
Get the vehicle handling of the current vehicle
Declaration
public Handling Handling { get; }
Property Value
|
Improve this Doc
View Source
HeadLightColor
Get and set the headlight color of this vehicle
Declaration
public Color HeadLightColor { get; set; }
Property Value
|
Improve this Doc
View Source
IsBlown
Get if this vehicle is blown up
Declaration
public bool IsBlown { get; }
Property Value
|
Improve this Doc
View Source
IsOnGround
Get if the vehicle is touching the ground
Declaration
public bool IsOnGround { get; }
Property Value
|
Improve this Doc
View Source
Locked
Get and set if the vehicle is locked
Declaration
public bool Locked { get; set; }
Property Value
|
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
|
Improve this Doc
View Source
Name
Get the name of this vehicle
Declaration
public string Name { get; }
Property Value
|
Improve this Doc
View Source
OverrideLights
Get and set the override-lights setting
Declaration
public OverrideLightState OverrideLights { get; set; }
Property Value
|
Improve this Doc
View Source
Paintjob
Declaration
public Paintjob Paintjob { get; set; }
Property Value
|
Improve this Doc
View Source
PlateText
Get and set the numberplate text
Declaration
public string PlateText { get; set; }
Property Value
|
Improve this Doc
View Source
PrimaryColor
Get and set the primary color of this vehicle
Declaration
public Color PrimaryColor { get; set; }
Property Value
|
Improve this Doc
View Source
SecondaryColor
Get and set the secondary color of this vehicle
Declaration
public Color SecondaryColor { get; set; }
Property Value
|
Improve this Doc
View Source
Sirens
The sirens of this vehicle
Declaration
public SharedSirens Sirens { get; }
Property Value
|
Improve this Doc
View Source
Upgrades
Get a dictionary with the ugprades of upgraded slots
Declaration
public Dictionary<UpgradeSlot, Upgrade> Upgrades { get; }
Property Value
|
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
|
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
|
Improve this Doc
View Source
VehicleType
Get a string representation of the type of this vehicle
Declaration
public string VehicleType { get; }
Property Value
|
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
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
|
Improve this Doc
View Source
DetachAnyTowedVehicle()
Detach all vehicles that are towed by this vehicle
Declaration
public bool DetachAnyTowedVehicle()
Returns
|
Improve this Doc
View Source
DetachTowedVehicle(SharedVehicle)
Detach a towed vehicle if any
Declaration
public bool DetachTowedVehicle(SharedVehicle attachedVehicle)
Parameters
Returns
|
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
Returns
|
Improve this Doc
View Source
GetCompatibleUpgrades()
Get all compatible upgrades for this vehicle
Declaration
public Upgrade[] GetCompatibleUpgrades()
Returns
|
Improve this Doc
View Source
GetCompatibleUpgrades(UpgradeSlot)
Get compatible upgrades for a specific upgrade slot
Declaration
public Upgrade[] GetCompatibleUpgrades(UpgradeSlot slot)
Parameters
Returns
|
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
|
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
|
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
|
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
|
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
Returns
|
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
|
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
Returns
|
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
Returns
|
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
Returns
|
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
Returns