Struct IPlayerPickupData
This type represents a pointer to an unmanaged open.mp IPlayerPickupData interface.
[OpenMpApi(new Type[] { typeof(IExtension) })]
public readonly struct IPlayerPickupData : IEquatable<IPlayerPickupData>, IPlayerPickupData.IManagedInterface, IExtension.IManagedInterface, IUnmanagedInterface
- Implements
- Inherited Members
Constructors
IPlayerPickupData(nint)
Initializes a new instance of the IPlayerPickupData struct.
public IPlayerPickupData(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(IPlayerPickupData)
public bool Equals(IPlayerPickupData other)
Parameters
otherIPlayerPickupData
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
FromClientID(int)
Converts a client pickup ID to its real ID equivalent.
public int FromClientID(int legacy)
Parameters
legacyintThe client pickup ID.
Returns
- int
The real pickup ID.
FromLegacyID(int)
Converts a legacy pickup ID to its real ID equivalent.
public int FromLegacyID(int legacy)
Parameters
legacyintThe legacy pickup ID.
Returns
- int
The real pickup ID.
GetHashCode()
public override int GetHashCode()
Returns
ReleaseClientID(int)
Releases a client pickup ID that was previously reserved.
public void ReleaseClientID(int legacy)
Parameters
legacyintThe client pickup ID to release.
ReleaseLegacyID(int)
Releases a legacy pickup ID that was previously reserved.
public void ReleaseLegacyID(int legacy)
Parameters
legacyintThe legacy pickup ID to release.
ReserveClientID()
Reserves an unused client pickup ID.
public int ReserveClientID()
Returns
- int
A reserved client pickup ID.
ReserveLegacyID()
Reserves an unused legacy pickup ID.
public int ReserveLegacyID()
Returns
- int
A reserved legacy pickup ID.
SetClientID(int, int)
Assigns a real pickup ID to a previously reserved client ID.
public void SetClientID(int legacy, int real)
Parameters
SetLegacyID(int, int)
Assigns a real pickup ID to a previously reserved legacy ID.
public void SetLegacyID(int legacy, int real)
Parameters
ToClientID(int)
Converts a real pickup ID to its client ID equivalent.
public int ToClientID(int real)
Parameters
realintThe real pickup ID.
Returns
- int
The client pickup ID.
ToLegacyID(int)
Converts a real pickup ID to its legacy ID equivalent.
public int ToLegacyID(int real)
Parameters
realintThe real pickup ID.
Returns
- int
The legacy pickup ID.
Operators
operator ==(IPlayerPickupData, object?)
Determines whether the specified values are equal.
public static bool operator ==(IPlayerPickupData lhs, object? rhs)
Parameters
lhsIPlayerPickupDataThe 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 IPlayerPickupData(IExtension)
Casts the IExtension to a IPlayerPickupData.
public static explicit operator IPlayerPickupData(IExtension value)
Parameters
valueIExtensionThe IExtension to cast.
Returns
- IPlayerPickupData
The converted IPlayerPickupData.
explicit operator IExtension(IPlayerPickupData)
Casts the IPlayerPickupData to a IExtension.
public static explicit operator IExtension(IPlayerPickupData value)
Parameters
valueIPlayerPickupDataThe IPlayerPickupData to cast.
Returns
- IExtension
The converted IExtension.
operator !=(IPlayerPickupData, object?)
Determines whether the specified values are not equal.
public static bool operator !=(IPlayerPickupData lhs, object? rhs)
Parameters
lhsIPlayerPickupDataThe 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; }