Struct IPlayerMenuData
This type represents a pointer to an unmanaged open.mp IPlayerMenuData interface.
[OpenMpApi(new Type[] { typeof(IExtension) })]
public readonly struct IPlayerMenuData : IEquatable<IPlayerMenuData>, IPlayerMenuData.IManagedInterface, IExtension.IManagedInterface, IUnmanagedInterface
- Implements
- Inherited Members
Constructors
IPlayerMenuData(nint)
Initializes a new instance of the IPlayerMenuData struct.
public IPlayerMenuData(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(IPlayerMenuData)
public bool Equals(IPlayerMenuData other)
Parameters
otherIPlayerMenuData
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetMenuID()
Gets the ID of the menu currently shown to the player.
public byte GetMenuID()
Returns
- byte
The menu ID, or 0xFF if no menu is currently shown.
SetMenuID(byte)
Sets the menu ID for the player.
public void SetMenuID(byte id)
Parameters
idbyteThe menu ID to set.
Operators
operator ==(IPlayerMenuData, object?)
Determines whether the specified values are equal.
public static bool operator ==(IPlayerMenuData lhs, object? rhs)
Parameters
lhsIPlayerMenuDataThe 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 IPlayerMenuData(IExtension)
Casts the IExtension to a IPlayerMenuData.
public static explicit operator IPlayerMenuData(IExtension value)
Parameters
valueIExtensionThe IExtension to cast.
Returns
- IPlayerMenuData
The converted IPlayerMenuData.
explicit operator IExtension(IPlayerMenuData)
Casts the IPlayerMenuData to a IExtension.
public static explicit operator IExtension(IPlayerMenuData value)
Parameters
valueIPlayerMenuDataThe IPlayerMenuData to cast.
Returns
- IExtension
The converted IExtension.
operator !=(IPlayerMenuData, object?)
Determines whether the specified values are not equal.
public static bool operator !=(IPlayerMenuData lhs, object? rhs)
Parameters
lhsIPlayerMenuDataThe 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; }