createCheckpoint

From IV:MP Wiki

Jump to: navigation, search

Server · (Functions · Events)


This function creates a checkpoint.


Contents

Syntax

int createCheckpoint ( int type, float posX, float posY, float posZ, float targetPosX, float targetPosY, float targetPosZ, float radius )

Parameters

(int type, float posX, float posY, float posZ, float nextPosX, float nextPosY, float nextPosZ, float radius)
int typeThe checkpoint's type
float posXThe checkpoint's X coordinate
float posYThe checkpoint's Y coordinate
float posZThe checkpoint's Z coordinate
float NextposXThe X coordinate of the next checkpoint
float NextposYThe Y coordinate of the next checkpoint
float NextposZThe Z coordinate of the next checkpoint
float radiusThe checkpoint's radius (size)

Returns

Checkpoint Types

See the checkpoint types page.

Example

This code adds a simple arrow checkpoint when the server starts up. See the playerEnterCheckpoint event page to see how to detect a player entering a checkpoint.

local checkpoint;
function addCheckpoint()
{
    checkpoint = createCheckpoint(6, -766.069,1407.84,1.48285, -740.31,1500.74,2.42586, 1.0);
}
addEvent("scriptInit", addCheckpoint);

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Server
Client
Scripting
Toolbox