Struct IPlayerVehicleData
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
handlenintA pointer to the unmanaged interface.
Properties
Handle
Gets the handle to the unmanaged interface instance.
public nint Handle { get; }
Property Value
HasValue
Gets a value indicating whether the pointer has a value.
public bool HasValue { get; }
Property Value
Methods
Equals(IPlayerVehicleData)
public bool Equals(IPlayerVehicleData other)
Parameters
otherIPlayerVehicleData
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
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
IsInDriveByMode()
Checks if the player is in drive-by mode.
public bool IsInDriveByMode()
Returns
IsInModShop()
Checks if the player is in a mod shop.
public bool IsInModShop()
Returns
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
lhsIPlayerVehicleDataThe value on the left side of the operator.
rhsobjectThe value on the right side of the operator.
Returns
- bool
trueif the values are equal; otherwise,false.
explicit operator IPlayerVehicleData(IExtension)
Casts the IExtension to a IPlayerVehicleData.
public static explicit operator IPlayerVehicleData(IExtension value)
Parameters
valueIExtensionThe IExtension to cast.
Returns
- IPlayerVehicleData
The converted IPlayerVehicleData.
explicit operator IExtension(IPlayerVehicleData)
Casts the IPlayerVehicleData to a IExtension.
public static explicit operator IExtension(IPlayerVehicleData value)
Parameters
valueIPlayerVehicleDataThe 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
lhsIPlayerVehicleDataThe value on the left side of the operator.
rhsobjectThe value on the right side of the operator.
Returns
- bool
trueif the values are not equal; otherwise,false.
Explicit Interface Implementations
ExtensionId
Gets the identifier of the extension type. IPool<T>
static UID ExtensionId { get; }