Table of Contents

Struct IRaceCheckpointData

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

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

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

Disable()

Disables this checkpoint.

public void Disable()

Enable()

Enables this checkpoint.

public void Enable()

Equals(IRaceCheckpointData)

public bool Equals(IRaceCheckpointData other)

Parameters

other IRaceCheckpointData

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

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

int

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

true if the checkpoint is enabled; otherwise, false.

IsPlayerInside()

Checks whether the player is inside this checkpoint.

public bool IsPlayerInside()

Returns

bool

true if 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

nextPosition Vector3

The next checkpoint position to set.

SetPlayerInside(bool)

Sets whether the player is inside this checkpoint.

public void SetPlayerInside(bool inside)

Parameters

inside bool

true to set the player as inside; false to set them as outside.

SetPosition(ref Vector3)

Sets the position of this checkpoint.

public void SetPosition(ref Vector3 position)

Parameters

position Vector3

The checkpoint position to set.

SetRadius(float)

Sets the radius of this checkpoint.

public void SetRadius(float radius)

Parameters

radius float

The checkpoint radius to set.

SetType(RaceCheckpointType)

Sets the type of this race checkpoint.

public void SetType(RaceCheckpointType type)

Parameters

type RaceCheckpointType

The checkpoint type to set.

Operators

operator ==(IRaceCheckpointData, object?)

Determines whether the specified values are equal.

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

Parameters

lhs IRaceCheckpointData

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 IRaceCheckpointData(ICheckpointDataBase)

public static explicit operator IRaceCheckpointData(ICheckpointDataBase value)

Parameters

value ICheckpointDataBase

The ICheckpointDataBase to cast.

Returns

IRaceCheckpointData

The converted IRaceCheckpointData.

explicit operator ICheckpointDataBase(IRaceCheckpointData)

public static explicit operator ICheckpointDataBase(IRaceCheckpointData value)

Parameters

value IRaceCheckpointData

The 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

lhs IRaceCheckpointData

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.