CreateCheckpoint
Внешний вид
(перенаправлено с «NAPI.Checkpoint.CreateCheckpoint»)
Шаблон:Server side csharp Create a checkpoint
Syntax
<syntaxhighlight lang="C#" >Checkpoint NAPI.Checkpoint.CreateCheckpoint(uint/int/CheckpointType model, Vector3 pos, Vector3 dir, float scale, Color color [, uint dimension = NAPI.GlobalDimension ]);</syntaxhighlight>
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". <syntaxhighlight lang="C#"> [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);
} </syntaxhighlight>