Struct IRaceCheckpointData
This type represents a pointer to an unmanaged open.mp IRaceCheckpointData interface.
[OpenMpApi(new Type[] { typeof(ICheckpointDataBase) })]
public readonly struct IRaceCheckpointData : IEquatable<IRaceCheckpointData>, IRaceCheckpointData.IManagedInterface, ICheckpointDataBase.IManagedInterface, IUnmanagedInterface
- Implements
- Inherited Members
Constructors
IRaceCheckpointData(nint)
Initializes a new instance of the IRaceCheckpointData struct.
public IRaceCheckpointData(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(IRaceCheckpointData)
public bool Equals(IRaceCheckpointData other)
Parameters
otherIRaceCheckpointData
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.
GetCheckpointType()
Gets the type of this race checkpoint.
[OpenMpApiFunction("getType")]
public RaceCheckpointType GetCheckpointType()
Returns
- RaceCheckpointType
The checkpoint type.
GetHashCode()
public override int GetHashCode()
Returns
GetNextPosition()
Gets the next checkpoint position in the race sequence.
public Vector3 GetNextPosition()
Returns
- Vector3
The position of the next checkpoint.
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.
SetNextPosition(ref Vector3)
Sets the next checkpoint position in the race sequence.
public void SetNextPosition(ref Vector3 nextPosition)
Parameters
nextPositionVector3The next checkpoint position to set.
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.
SetType(RaceCheckpointType)
Sets the type of this race checkpoint.
public void SetType(RaceCheckpointType type)
Parameters
typeRaceCheckpointTypeThe checkpoint type to set.
Operators
operator ==(IRaceCheckpointData, object?)
Determines whether the specified values are equal.
public static bool operator ==(IRaceCheckpointData lhs, object? rhs)
Parameters
lhsIRaceCheckpointDataThe 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 IRaceCheckpointData(ICheckpointDataBase)
Casts the ICheckpointDataBase to a IRaceCheckpointData.
public static explicit operator IRaceCheckpointData(ICheckpointDataBase value)
Parameters
valueICheckpointDataBaseThe ICheckpointDataBase to cast.
Returns
- IRaceCheckpointData
The converted IRaceCheckpointData.
explicit operator ICheckpointDataBase(IRaceCheckpointData)
Casts the IRaceCheckpointData to a ICheckpointDataBase.
public static explicit operator ICheckpointDataBase(IRaceCheckpointData value)
Parameters
valueIRaceCheckpointDataThe IRaceCheckpointData to cast.
Returns
- ICheckpointDataBase
The converted ICheckpointDataBase.
operator !=(IRaceCheckpointData, object?)
Determines whether the specified values are not equal.
public static bool operator !=(IRaceCheckpointData lhs, object? rhs)
Parameters
lhsIRaceCheckpointDataThe 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.