From IV:MP Wiki
This function creates a checkpoint.
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)
| float posX | The checkpoint's X coordinate |
| float posY | The checkpoint's Y coordinate |
| float posZ | The checkpoint's Z coordinate |
| float NextposX | The X coordinate of the next checkpoint |
| float NextposY | The Y coordinate of the next checkpoint |
| float NextposZ | The Z coordinate of the next checkpoint |
| float radius | The checkpoint's radius (size) |
Returns
- Returns the checkpoint's ID if the checkpoint was created successfully, false otherwise.
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