Interface IVehicle.IManagedInterface
Represents the managed interface implemented by its unmanaged counterpart.
public interface IVehicle.IManagedInterface : IUnmanagedInterface
- Inherited Members
Methods
AddCarriage(IVehicle, int)
Adds a carriage to the vehicle.
void AddCarriage(IVehicle carriage, int pos)
Parameters
AddComponent(int)
Adds a component to the vehicle.
void AddComponent(int component)
Parameters
componentintThe component ID to add.
AttachTrailer(IVehicle)
Attaches a trailer to the vehicle.
void AttachTrailer(IVehicle trailer)
Parameters
trailerIVehicleThe trailer to attach.
DetachTrailer()
Detaches the trailer from the vehicle.
void DetachTrailer()
GetAngularVelocity()
Gets the angular velocity of the vehicle.
Vector3 GetAngularVelocity()
Returns
- Vector3
The angular velocity of the vehicle.
GetCab()
Gets the cab of the vehicle.
IVehicle GetCab()
Returns
- IVehicle
The cab of the vehicle.
GetCarriages()
Gets the carriages attached to the vehicle.
ref CarriagesArray GetCarriages()
Returns
- CarriagesArray
The carriages attached to the vehicle.
GetColour()
Gets the primary and secondary colors of the vehicle.
(int, int) GetColour()
Returns
GetColour(out Pair<int, int>)
Gets the primary and secondary colors of the vehicle.
void GetColour(out Pair<int, int> result)
Parameters
GetComponentInSlot(int)
Gets the component in a specific slot of the vehicle.
int GetComponentInSlot(int slot)
Parameters
slotintThe slot ID to check.
Returns
- int
The component ID in the specified slot.
GetDamageStatus(out int, out int, out int, out int)
Gets the damage status of the vehicle.
void GetDamageStatus(out int panelStatus, out int doorStatus, out int lightStatus, out int tyreStatus)
Parameters
panelStatusintThe output parameter for the status of the vehicle's panels.
doorStatusintThe output parameter for the status of the vehicle's doors.
lightStatusintThe output parameter for the status of the vehicle's lights.
tyreStatusintThe output parameter for the status of the vehicle's tyres.
GetDriver()
Gets the driver of the vehicle.
IPlayer GetDriver()
Returns
- IPlayer
The player who is the driver of the vehicle.
GetHealth()
Gets the health of the vehicle.
float GetHealth()
Returns
- float
The health value of the vehicle.
GetHydraThrustAngle()
Gets the hydra thrust angle of the vehicle.
uint GetHydraThrustAngle()
Returns
- uint
The hydra thrust angle of the vehicle.
GetInterior()
Gets the interior ID of the vehicle.
int GetInterior()
Returns
- int
The interior ID of the vehicle.
GetLandingGearState()
Gets the state of the vehicle's landing gear.
byte GetLandingGearState()
Returns
- byte
The state of the landing gear.
GetLastDriverPoolID()
Gets the pool ID of the last driver of the vehicle.
int GetLastDriverPoolID()
Returns
- int
The pool ID of the last driver.
GetLastOccupiedTime()
Gets the last time the vehicle was occupied.
ref TimePoint GetLastOccupiedTime()
Returns
- TimePoint
The last occupied time of the vehicle.
GetLastSpawnTime()
Gets the last time the vehicle was spawned.
ref TimePoint GetLastSpawnTime()
Returns
- TimePoint
The last spawn time of the vehicle.
GetModel()
Gets the model ID of the vehicle.
int GetModel()
Returns
- int
The model ID of the vehicle.
GetPaintJob()
Gets the paint job of the vehicle.
int GetPaintJob()
Returns
- int
The paint job ID of the vehicle.
GetParams()
Gets the parameters of the vehicle.
VehicleParams GetParams()
Returns
- VehicleParams
The parameters of the vehicle.
GetPassengers()
Gets the passengers of the vehicle.
FlatPtrHashSet<IPlayer> GetPassengers()
Returns
- FlatPtrHashSet<IPlayer>
A set of players who are passengers in the vehicle.
GetPlate()
Gets the license plate text of the vehicle.
string GetPlate()
Returns
- string
The license plate text of the vehicle.
GetRespawnDelay()
Gets the respawn delay of the vehicle.
TimeSpan GetRespawnDelay()
Returns
- TimeSpan
The respawn delay of the vehicle.
GetSirenState()
Gets the siren state of the vehicle.
byte GetSirenState()
Returns
- byte
The siren state of the vehicle.
GetSpawnData()
Gets the spawn data for the vehicle.
VehicleSpawnData GetSpawnData()
Returns
- VehicleSpawnData
The spawn data of the vehicle.
GetTrailer()
Gets the trailer attached to the vehicle.
IVehicle GetTrailer()
Returns
- IVehicle
The trailer attached to the vehicle.
GetTrainSpeed()
Gets the train speed of the vehicle.
float GetTrainSpeed()
Returns
- float
The train speed of the vehicle.
GetVelocity()
Gets the velocity of the vehicle.
Vector3 GetVelocity()
Returns
- Vector3
The velocity of the vehicle.
GetZAngle()
Gets the Z angle (rotation) of the vehicle.
float GetZAngle()
Returns
- float
The Z angle of the vehicle.
HasBeenOccupied()
Checks if the vehicle has been occupied.
bool HasBeenOccupied()
Returns
- bool
True if the vehicle has been occupied; otherwise, false.
IsDead()
Checks if the vehicle is dead.
bool IsDead()
Returns
- bool
True if the vehicle is dead; otherwise, false.
IsOccupied()
Checks if the vehicle is currently occupied.
bool IsOccupied()
Returns
- bool
True if the vehicle is occupied; otherwise, false.
IsRespawning()
Checks if the vehicle is respawning.
bool IsRespawning()
Returns
- bool
True if the vehicle is respawning; otherwise, false.
IsStreamedInForPlayer(IPlayer)
Checks if the vehicle is streamed in for a specific player.
bool IsStreamedInForPlayer(IPlayer player)
Parameters
playerIPlayerThe player to check.
Returns
- bool
True if the vehicle is streamed in for the player; otherwise, false.
IsTrailer()
Checks if the vehicle has a trailer attached.
bool IsTrailer()
Returns
- bool
True if the vehicle has a trailer attached; otherwise, false.
PutPlayer(IPlayer, int)
Places a player in a specific seat of the vehicle.
void PutPlayer(IPlayer player, int seatID)
Parameters
RemoveComponent(int)
Removes a component from the vehicle.
void RemoveComponent(int component)
Parameters
componentintThe component ID to remove.
Repair()
Repairs the vehicle.
void Repair()
Respawn()
Respawns the vehicle.
void Respawn()
SetAngularVelocity(Vector3)
Sets the angular velocity of the vehicle.
void SetAngularVelocity(Vector3 velocity)
Parameters
velocityVector3The angular velocity to set.
SetColour(int, int)
Sets the primary and secondary colors of the vehicle.
void SetColour(int col1, int col2)
Parameters
SetDamageStatus(int, int, byte, byte, IPlayer)
Sets the damage status of the vehicle.
void SetDamageStatus(int panelStatus, int doorStatus, byte lightStatus, byte tyreStatus, IPlayer vehicleUpdater = default)
Parameters
panelStatusintThe status of the vehicle's panels.
doorStatusintThe status of the vehicle's doors.
lightStatusbyteThe status of the vehicle's lights.
tyreStatusbyteThe status of the vehicle's tyres.
vehicleUpdaterIPlayerThe player updating the vehicle's damage status. Optional.
SetHealth(float)
Sets the health of the vehicle.
void SetHealth(float health)
Parameters
healthfloatThe health value to set.
SetInterior(int)
Sets the interior ID of the vehicle.
void SetInterior(int interiorID)
Parameters
interiorIDintThe interior ID to set.
SetPaintJob(int)
Sets the paint job of the vehicle.
void SetPaintJob(int paintjob)
Parameters
paintjobintThe paint job ID to set.
SetParams(ref VehicleParams)
Sets the parameters of the vehicle.
void SetParams(ref VehicleParams parameters)
Parameters
parametersVehicleParamsThe parameters to set.
SetParamsForPlayer(IPlayer, ref VehicleParams)
Sets the parameters of the vehicle for a specific player.
void SetParamsForPlayer(IPlayer player, ref VehicleParams parameters)
Parameters
playerIPlayerThe player for whom to set the parameters.
parametersVehicleParamsThe parameters to set.
SetPlate(string)
Sets the license plate text for the vehicle.
void SetPlate(string plate)
Parameters
platestringThe license plate text to set.
SetRespawnDelay(TimeSpan)
Sets the respawn delay of the vehicle.
void SetRespawnDelay(TimeSpan delay)
Parameters
delayTimeSpanThe respawn delay to set.
SetSiren(bool)
Sets the siren status of the vehicle.
void SetSiren(bool status)
Parameters
statusboolThe siren status to set.
SetSpawnData(ref VehicleSpawnData)
Sets the spawn data for the vehicle.
void SetSpawnData(ref VehicleSpawnData data)
Parameters
dataVehicleSpawnDataThe spawn data to set.
SetVelocity(Vector3)
Sets the velocity of the vehicle.
void SetVelocity(Vector3 velocity)
Parameters
velocityVector3The velocity to set.
SetZAngle(float)
Sets the Z angle (rotation) of the vehicle.
void SetZAngle(float angle)
Parameters
anglefloatThe Z angle to set.
StreamInForPlayer(IPlayer)
Streams the vehicle in for a specific player.
void StreamInForPlayer(IPlayer player)
Parameters
playerIPlayerThe player for whom to stream the vehicle.
StreamOutForPlayer(IPlayer)
Streams the vehicle out for a specific player.
void StreamOutForPlayer(IPlayer player)
Parameters
playerIPlayerThe player for whom to stream the vehicle out.
StreamedForPlayers()
Gets the players for whom the vehicle is streamed in.
FlatPtrHashSet<IPlayer> StreamedForPlayers()
Returns
- FlatPtrHashSet<IPlayer>
A set of players for whom the vehicle is streamed in.
UpdateCarriage(Vector3, Vector3)
Updates the position and velocity of a carriage.
void UpdateCarriage(Vector3 pos, Vector3 veloc)
Parameters
UpdateFromDriverSync(ref VehicleDriverSyncPacket, IPlayer)
Updates the vehicle state based on driver synchronization data.
bool UpdateFromDriverSync(ref VehicleDriverSyncPacket vehicleSync, IPlayer player)
Parameters
vehicleSyncVehicleDriverSyncPacketThe driver synchronization data.
playerIPlayerThe player associated with the synchronization.
Returns
- bool
True if the update was successful; otherwise, false.
UpdateFromPassengerSync(ref VehiclePassengerSyncPacket, IPlayer)
Updates the vehicle state based on passenger synchronization data.
bool UpdateFromPassengerSync(ref VehiclePassengerSyncPacket passengerSync, IPlayer player)
Parameters
passengerSyncVehiclePassengerSyncPacketThe passenger synchronization data.
playerIPlayerThe player associated with the synchronization.
Returns
- bool
True if the update was successful; otherwise, false.
UpdateFromTrailerSync(ref VehicleTrailerSyncPacket, IPlayer)
Updates the vehicle state based on trailer synchronization data.
bool UpdateFromTrailerSync(ref VehicleTrailerSyncPacket unoccupiedSync, IPlayer player)
Parameters
unoccupiedSyncVehicleTrailerSyncPacketThe trailer synchronization data.
playerIPlayerThe player associated with the synchronization.
Returns
- bool
True if the update was successful; otherwise, false.
UpdateFromUnoccupied(ref VehicleUnoccupiedSyncPacket, IPlayer)
Updates the vehicle state based on unoccupied synchronization data.
bool UpdateFromUnoccupied(ref VehicleUnoccupiedSyncPacket unoccupiedSync, IPlayer player)
Parameters
unoccupiedSyncVehicleUnoccupiedSyncPacketThe unoccupied synchronization data.
playerIPlayerThe player associated with the synchronization.
Returns
- bool
True if the update was successful; otherwise, false.