createCheckpoint
CREATE_CHECKPOINT0x0134F0835AB6BFCBThe GTA V native CREATE_CHECKPOINT of the GRAPHICS namespace, as LS:MP client scripts call it: the global function createCheckpoint, in JavaScript and in Lua.
createCheckpoint(
type: number,
posX1: number,
posY1: number,
posZ1: number,
posX2: number,
posY2: number,
posZ2: number,
diameter: number,
red: number,
green: number,
blue: number,
alpha: number,
reserved: number
): numbercreateCheckpoint(
type: integer,
posX1: number,
posY1: number,
posZ1: number,
posX2: number,
posY2: number,
posZ2: number,
diameter: number,
red: integer,
green: integer,
blue: integer,
alpha: integer,
reserved: integer
): integerUsage
const result = createCheckpoint(
type, posX1, posY1, posZ1, posX2, posY2, posZ2, diameter, red, green, blue, alpha, reserved
);local result = createCheckpoint(
type, posX1, posY1, posZ1, posX2, posY2, posZ2, diameter, red, green, blue, alpha, reserved
)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
const result = createCheckpoint(type, pos1, pos2, diameter, red, green, blue, alpha, reserved);local result = createCheckpoint(type, pos1, pos2, diameter, red, green, blue, alpha, reserved)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
type | int | number | integer |
posX1 | float | number | number |
posY1 | float | number | number |
posZ1 | float | number | number |
posX2 | float | number | number |
posY2 | float | number | number |
posZ2 | float | number | number |
diameter | float | number | number |
red | int | number | integer |
green | int | number | integer |
blue | int | number | integer |
alpha | int | number | integer |
reserved | int | number | integer |
Returns
int JavaScript number, Lua integerNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Creates a checkpoint. Returns the handle of the checkpoint.
20/03/17 : Attention, checkpoints are already handled by the game itself, so you must not loop it like markers.
Parameters:
* type - The type of checkpoint to create. See below for a list of checkpoint types.
* pos1 - The position of the checkpoint.
* pos2 - The position of the next checkpoint to point to.
* radius - The radius of the checkpoint.
* color - The color of the checkpoint.
* reserved - Special parameter, see below for details. Usually set to 0 in the scripts.
Checkpoint types:
0-4---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
5-9---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
10-14-------Ring: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
15-19-------1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
20-24-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
25-29-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
30-34-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
35-38-------Ring: Airplane Up, Left, Right, UpsideDown
39----------?
40----------Ring: just a ring
41----------?
42-44-------Cylinder w/ number (uses 'reserved' parameter)
45-47-------Cylinder no arrow or number
If using type 42-44, reserved sets number / number and shape to display
0-99------------Just numbers (0-99)
100-109-----------------Arrow (0-9)
110-119------------Two arrows (0-9)
120-129----------Three arrows (0-9)
130-139----------------Circle (0-9)
140-149------------CycleArrow (0-9)
150-159----------------Circle (0-9)
160-169----Circle w/ pointer (0-9)
170-179-------Perforated ring (0-9)
180-189----------------Sphere (0-9)
Reference
- Namespace
- Graphics GRAPHICS
- In the game
int CREATE_CHECKPOINT(int type, float posX1, float posY1, float posZ1, float posX2, float posY2, float posZ2, float diameter, int red, int green, int blue, int alpha, int reserved)- Hash
0x0134F0835AB6BFCB