Struct IPlayerClassData
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
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(IPlayerClassData)
public bool Equals(IPlayerClassData other)
Parameters
otherIPlayerClassData
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
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
SetSpawnInfo(ref PlayerClass)
Sets the spawn information for the player's class.
public void SetSpawnInfo(ref PlayerClass info)
Parameters
infoPlayerClassThe 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
lhsIPlayerClassDataThe 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 IPlayerClassData(IExtension)
Casts the IExtension to a IPlayerClassData.
public static explicit operator IPlayerClassData(IExtension value)
Parameters
valueIExtensionThe 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
valueIPlayerClassDataThe 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
lhsIPlayerClassDataThe 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; }