Skip to main content

CreateCheckpoint

Create a checkpoint

Syntax

```csharp Checkpoint NAPI.Checkpoint.CreateCheckpoint(uint/int/CheckpointType model, Vector3 pos, Vector3 dir, float scale, Color color [, uint dimension = NAPI.GlobalDimension ]); ```

Required Arguments

  • model: Model of the checkpoint. Parameter input should be in uint, int or CheckpointType type.
  • pos: Position of the checkpoint. Parameter input should be in Vector3 type.
  • dir: Direction of the checkpoint. Parameter input should be in Vector3 type.
  • scale: Scale of the checkpoint. Parameter input should be in float type.
  • color: Color of the checkpoint. Parameter input should be in Color type.

Optional Arguments

  • dimension: Dimension of the checkpoint. Parameter input should be in uint type.

Usage example(s)

In this example, a checkpoint will be created on the player who type the command "/cp".

```csharp [Command("cp")] public void createCheckpoint(Client client, string commandArgs) {

   var clientPosition = NAPI.Entity.GetEntityPosition(client);
   NAPI.Checkpoint.CreateCheckpoint(CheckpointType.Cyclinder, clientPosition, new Vector3(0, 1, 0), 1f, new Color(255, 0, 0), 0);

} ```