Table of Contents

Struct IPlayerTextLabelData

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

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

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

Constructors

IPlayerTextLabelData(nint)

Initializes a new instance of the IPlayerTextLabelData struct.

public IPlayerTextLabelData(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

AsPool()

Gets the pool interface for managing per-player text labels.

public IPool<IPlayerTextLabel> AsPool()

Returns

IPool<IPlayerTextLabel>

A pool interface for per-player text labels.

Bounds()

Gets the bounds of the pool.

public (Size, Size) Bounds()

Returns

(Size, Size)

A tuple containing the lower and upper bounds of the pool.

Count()

Gets the number of elements in the pool.

public Size Count()

Returns

Size

The number of elements in the pool.

Create(string, Colour, Vector3, float, bool)

Creates a new per-player text label.

public IPlayerTextLabel Create(string text, Colour colour, Vector3 pos, float drawDist, bool los)

Parameters

text string

The text to display on the label.

colour Colour

The colour of the text label.

pos Vector3

The position where the text label will be created.

drawDist float

The draw distance of the text label.

los bool

Whether line-of-sight testing is enabled.

Returns

IPlayerTextLabel

The created per-player text label, or null if creation failed.

Create(string, Colour, Vector3, float, bool, IPlayer)

Creates a new per-player text label attached to a player.

[OpenMpApiOverload("_player")]
public IPlayerTextLabel Create(string text, Colour colour, Vector3 pos, float drawDist, bool los, IPlayer attach)

Parameters

text string

The text to display on the label.

colour Colour

The colour of the text label.

pos Vector3

The position offset from the player.

drawDist float

The draw distance of the text label.

los bool

Whether line-of-sight testing is enabled.

attach IPlayer

The player to attach the text label to.

Returns

IPlayerTextLabel

The created per-player text label, or null if creation failed.

Create(string, Colour, Vector3, float, bool, IVehicle)

Creates a new per-player text label attached to a vehicle.

[OpenMpApiOverload("_vehicle")]
public IPlayerTextLabel Create(string text, Colour colour, Vector3 pos, float drawDist, bool los, IVehicle attach)

Parameters

text string

The text to display on the label.

colour Colour

The colour of the text label.

pos Vector3

The position offset from the vehicle.

drawDist float

The draw distance of the text label.

los bool

Whether line-of-sight testing is enabled.

attach IVehicle

The vehicle to attach the text label to.

Returns

IPlayerTextLabel

The created per-player text label, or null if creation failed.

Equals(IPlayerTextLabelData)

public bool Equals(IPlayerTextLabelData other)

Parameters

other IPlayerTextLabelData

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

Get(int)

Gets the element at the specified index.

public IPlayerTextLabel Get(int index)

Parameters

index int

The index of the element to retrieve.

Returns

IPlayerTextLabel

The element at the specified index.

GetEnumerator()

Gets an enumerator that iterates through the pool.

public IPool<IPlayerTextLabel>.Enumerator GetEnumerator()

Returns

IPool<IPlayerTextLabel>.Enumerator

An enumerator for the pool.

GetHashCode()

public override int GetHashCode()

Returns

int

GetPoolEventDispatcher()

Gets the event dispatcher for the pool.

public IEventDispatcher<IPoolEventHandler<IPlayerTextLabel>> GetPoolEventDispatcher()

Returns

IEventDispatcher<IPoolEventHandler<IPlayerTextLabel>>

An IEventDispatcher<T> for handling pool events.

Lock(int)

Locks the element at the specified index.

public void Lock(int index)

Parameters

index int

The index of the element to lock.

Release(int)

Releases the element at the specified index.

public void Release(int index)

Parameters

index int

The index of the element to release.

Unlock(int)

Unlocks the element at the specified index.

public bool Unlock(int index)

Parameters

index int

The index of the element to unlock.

Returns

bool

true if the element was successfully unlocked; otherwise, false.

Operators

operator ==(IPlayerTextLabelData, object?)

Determines whether the specified values are equal.

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

Parameters

lhs IPlayerTextLabelData

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

public static explicit operator IPlayerTextLabelData(IExtension value)

Parameters

value IExtension

The IExtension to cast.

Returns

IPlayerTextLabelData

The converted IPlayerTextLabelData.

explicit operator IExtension(IPlayerTextLabelData)

public static explicit operator IExtension(IPlayerTextLabelData value)

Parameters

value IPlayerTextLabelData

The IPlayerTextLabelData to cast.

Returns

IExtension

The converted IExtension.

explicit operator IPool<IPlayerTextLabel>(IPlayerTextLabelData)

public static explicit operator IPool<IPlayerTextLabel>(IPlayerTextLabelData value)

Parameters

value IPlayerTextLabelData

The IPlayerTextLabelData to cast.

Returns

IPool<IPlayerTextLabel>

The converted IPool<T>.

explicit operator IPlayerTextLabelData(IPool<IPlayerTextLabel>)

public static explicit operator IPlayerTextLabelData(IPool<IPlayerTextLabel> value)

Parameters

value IPool<IPlayerTextLabel>

The IPool<T> to cast.

Returns

IPlayerTextLabelData

The converted IPlayerTextLabelData.

operator !=(IPlayerTextLabelData, object?)

Determines whether the specified values are not equal.

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

Parameters

lhs IPlayerTextLabelData

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