Struct ICheckpointData
This type represents a pointer to an unmanaged open.mp ICheckpointData interface.
[OpenMpApi(new Type[] { typeof(ICheckpointDataBase) })]
public readonly struct ICheckpointData : IEquatable<ICheckpointData>, ICheckpointData.IManagedInterface, ICheckpointDataBase.IManagedInterface, IUnmanagedInterface
- Implements
- Inherited Members
Constructors
ICheckpointData(nint)
Initializes a new instance of the ICheckpointData struct.
public ICheckpointData(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
Disable()
Disables this checkpoint.
public void Disable()
Enable()
Enables this checkpoint.
public void Enable()
Equals(ICheckpointData)
public bool Equals(ICheckpointData other)
Parameters
otherICheckpointData
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
EtRadius()
Gets the radius of this checkpoint.
public float EtRadius()
Returns
- float
The checkpoint radius.
GetHashCode()
public override int GetHashCode()
Returns
GetPosition()
Gets the position of this checkpoint.
public Vector3 GetPosition()
Returns
- Vector3
The checkpoint position.
IsEnabled()
Checks whether this checkpoint is enabled.
public bool IsEnabled()
Returns
- bool
trueif the checkpoint is enabled; otherwise,false.
IsPlayerInside()
Checks whether the player is inside this checkpoint.
public bool IsPlayerInside()
Returns
- bool
trueif the player is inside the checkpoint; otherwise,false.
SetPlayerInside(bool)
Sets whether the player is inside this checkpoint.
public void SetPlayerInside(bool inside)
Parameters
insidebooltrueto set the player as inside;falseto set them as outside.
SetPosition(ref Vector3)
Sets the position of this checkpoint.
public void SetPosition(ref Vector3 position)
Parameters
positionVector3The checkpoint position to set.
SetRadius(float)
Sets the radius of this checkpoint.
public void SetRadius(float radius)
Parameters
radiusfloatThe checkpoint radius to set.
Operators
operator ==(ICheckpointData, object?)
Determines whether the specified values are equal.
public static bool operator ==(ICheckpointData lhs, object? rhs)
Parameters
lhsICheckpointDataThe 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 ICheckpointDataBase(ICheckpointData)
Casts the ICheckpointData to a ICheckpointDataBase.
public static explicit operator ICheckpointDataBase(ICheckpointData value)
Parameters
valueICheckpointDataThe ICheckpointData to cast.
Returns
- ICheckpointDataBase
The converted ICheckpointDataBase.
explicit operator ICheckpointData(ICheckpointDataBase)
Casts the ICheckpointDataBase to a ICheckpointData.
public static explicit operator ICheckpointData(ICheckpointDataBase value)
Parameters
valueICheckpointDataBaseThe ICheckpointDataBase to cast.
Returns
- ICheckpointData
The converted ICheckpointData.
operator !=(ICheckpointData, object?)
Determines whether the specified values are not equal.
public static bool operator !=(ICheckpointData lhs, object? rhs)
Parameters
lhsICheckpointDataThe 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.