Table of Contents

Struct IPlayerVehicleData

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

This type represents a pointer to an unmanaged open.mp IPlayerVehicleData interface.

[OpenMpApi(new Type[] { typeof(IExtension) })]
public readonly struct IPlayerVehicleData : IEquatable<IPlayerVehicleData>, IPlayerVehicleData.IManagedInterface, IExtension.IManagedInterface, IUnmanagedInterface
Implements
Inherited Members

Constructors

IPlayerVehicleData(nint)

Initializes a new instance of the IPlayerVehicleData struct.

public IPlayerVehicleData(nint handle)

Parameters

handle nint

A pointer to the unmanaged interface.

Properties

Handle

Gets the handle to the unmanaged interface instance.

public nint Handle { get; }

Property Value

nint

HasValue

Gets a value indicating whether the pointer has a value.

public bool HasValue { get; }

Property Value

bool

Methods

Equals(IPlayerVehicleData)

public bool Equals(IPlayerVehicleData other)

Parameters

other IPlayerVehicleData

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetSeat()

Gets the seat the player is currently occupying in a vehicle.

public int GetSeat()

Returns

int

The seat index, or -1 if the player is not in a vehicle.

GetVehicle()

Gets the vehicle the player is currently in.

public IVehicle GetVehicle()

Returns

IVehicle

The vehicle the player is in, or null if not in a vehicle.

IsCuffed()

Checks if the player is cuffed.

public bool IsCuffed()

Returns

bool

true if the player is cuffed; otherwise, false.

IsInDriveByMode()

Checks if the player is in drive-by mode.

public bool IsInDriveByMode()

Returns

bool

true if the player is in drive-by mode; otherwise, false.

IsInModShop()

Checks if the player is in a mod shop.

public bool IsInModShop()

Returns

bool

true if the player is in a mod shop; otherwise, false.

ResetVehicle()

Resets the player's vehicle data internally.

public void ResetVehicle()

Remarks

This is an internal method and should not be called in typical scenarios. It is not intended for vehicle destruction or removing players from vehicles.

Operators

operator ==(IPlayerVehicleData, object?)

Determines whether the specified values are equal.

public static bool operator ==(IPlayerVehicleData lhs, object? rhs)

Parameters

lhs IPlayerVehicleData

The value on the left side of the operator.

rhs object

The value on the right side of the operator.

Returns

bool

true if the values are equal; otherwise, false.

explicit operator IPlayerVehicleData(IExtension)

public static explicit operator IPlayerVehicleData(IExtension value)

Parameters

value IExtension

The IExtension to cast.

Returns

IPlayerVehicleData

The converted IPlayerVehicleData.

explicit operator IExtension(IPlayerVehicleData)

public static explicit operator IExtension(IPlayerVehicleData value)

Parameters

value IPlayerVehicleData

The IPlayerVehicleData to cast.

Returns

IExtension

The converted IExtension.

operator !=(IPlayerVehicleData, object?)

Determines whether the specified values are not equal.

public static bool operator !=(IPlayerVehicleData lhs, object? rhs)

Parameters

lhs IPlayerVehicleData

The value on the left side of the operator.

rhs object

The value on the right side of the operator.

Returns

bool

true if the values are not equal; otherwise, false.

Explicit Interface Implementations

ExtensionId

Gets the identifier of the extension type. IPool<T>

static UID ExtensionId { get; }

Returns

UID