Table of Contents

Struct VehicleSpawnInfo

Namespace
SampSharp.Entities.SAMP
Assembly
SampSharp.OpenMp.Entities.dll

Describes the data used to spawn (and respawn) a vehicle.

public readonly struct VehicleSpawnInfo : IEquatable<VehicleSpawnInfo>
Implements
Inherited Members

Constructors

VehicleSpawnInfo(int, Vector3, float, int, int, bool, int, TimeSpan)

Describes the data used to spawn (and respawn) a vehicle.

public VehicleSpawnInfo(int ModelId, Vector3 Position, float ZRotation, int PrimaryColor, int SecondaryColor, bool HasSiren, int Interior, TimeSpan RespawnDelay)

Parameters

ModelId int

The vehicle model ID.

Position Vector3

The world position where the vehicle should spawn.

ZRotation float

The Z-axis rotation in degrees.

PrimaryColor int

The primary color ID.

SecondaryColor int

The secondary color ID.

HasSiren bool

A value indicating whether the vehicle has a siren.

Interior int

The interior ID.

RespawnDelay TimeSpan

The respawn delay.

Properties

HasSiren

A value indicating whether the vehicle has a siren.

public bool HasSiren { get; init; }

Property Value

bool

Interior

The interior ID.

public int Interior { get; init; }

Property Value

int

ModelId

The vehicle model ID.

public int ModelId { get; init; }

Property Value

int

Position

The world position where the vehicle should spawn.

public Vector3 Position { get; init; }

Property Value

Vector3

PrimaryColor

The primary color ID.

public int PrimaryColor { get; init; }

Property Value

int

RespawnDelay

The respawn delay.

public TimeSpan RespawnDelay { get; init; }

Property Value

TimeSpan

SecondaryColor

The secondary color ID.

public int SecondaryColor { get; init; }

Property Value

int

ZRotation

The Z-axis rotation in degrees.

public float ZRotation { get; init; }

Property Value

float

Methods

Deconstruct(out int, out Vector3, out float, out int, out int, out bool, out int, out TimeSpan)

public void Deconstruct(out int ModelId, out Vector3 Position, out float ZRotation, out int PrimaryColor, out int SecondaryColor, out bool HasSiren, out int Interior, out TimeSpan RespawnDelay)

Parameters

ModelId int
Position Vector3
ZRotation float
PrimaryColor int
SecondaryColor int
HasSiren bool
Interior int
RespawnDelay TimeSpan

Equals(VehicleSpawnInfo)

public bool Equals(VehicleSpawnInfo other)

Parameters

other VehicleSpawnInfo

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(VehicleSpawnInfo, VehicleSpawnInfo)

public static bool operator ==(VehicleSpawnInfo left, VehicleSpawnInfo right)

Parameters

left VehicleSpawnInfo
right VehicleSpawnInfo

Returns

bool

operator !=(VehicleSpawnInfo, VehicleSpawnInfo)

public static bool operator !=(VehicleSpawnInfo left, VehicleSpawnInfo right)

Parameters

left VehicleSpawnInfo
right VehicleSpawnInfo

Returns

bool