Table of Contents

Struct IPlayerClassData

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

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

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

Constructors

IPlayerClassData(nint)

Initializes a new instance of the IPlayerClassData struct.

public IPlayerClassData(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(IPlayerClassData)

public bool Equals(IPlayerClassData other)

Parameters

other IPlayerClassData

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

GetClass()

Gets the player's current class information.

public ref PlayerClass GetClass()

Returns

PlayerClass

A reference to the player's class data.

GetHashCode()

public override int GetHashCode()

Returns

int

SetSpawnInfo(ref PlayerClass)

Sets the spawn information for the player's class.

public void SetSpawnInfo(ref PlayerClass info)

Parameters

info PlayerClass

The class spawn information to set.

SpawnPlayer()

Spawns the player with their current class information.

public void SpawnPlayer()

Operators

operator ==(IPlayerClassData, object?)

Determines whether the specified values are equal.

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

Parameters

lhs IPlayerClassData

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

Casts the IExtension to a IPlayerClassData.

public static explicit operator IPlayerClassData(IExtension value)

Parameters

value IExtension

The IExtension to cast.

Returns

IPlayerClassData

The converted IPlayerClassData.

explicit operator IExtension(IPlayerClassData)

Casts the IPlayerClassData to a IExtension.

public static explicit operator IExtension(IPlayerClassData value)

Parameters

value IPlayerClassData

The IPlayerClassData to cast.

Returns

IExtension

The converted IExtension.

operator !=(IPlayerClassData, object?)

Determines whether the specified values are not equal.

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

Parameters

lhs IPlayerClassData

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