Table of Contents

Struct IPlayerMenuData

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

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

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(IPlayerMenuData)

public bool Equals(IPlayerMenuData other)

Parameters

other IPlayerMenuData

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

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

id byte

The menu ID to set.

Operators

operator ==(IPlayerMenuData, object?)

Determines whether the specified values are equal.

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

Parameters

lhs IPlayerMenuData

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 IPlayerMenuData(IExtension)

Casts the IExtension to a IPlayerMenuData.

public static explicit operator IPlayerMenuData(IExtension value)

Parameters

value IExtension

The 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

value IPlayerMenuData

The 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

lhs IPlayerMenuData

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