Graphics::createCheckpoint: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
Line 1: Line 1:
{{Rework required}}
Creates a checkpoint. Returns the handle of the checkpoint.<br><br>Parameters:<br>* type - The type of checkpoint to create. See below for a list of checkpoint types.<br>* pos1 - The position of the checkpoint.<br>* pos2 - The position of the next checkpoint to point to.<br>* radius - The radius of the checkpoint.<br>* color - The color of the checkpoint.<br>* reserved - Special parameter, see below for details. Usually set to 0 in the scripts.<br><br>Checkpoint types:<br>0-4---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker<br>5-9---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker<br>10-14-------Ring: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker<br>15-19-------1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker      <br>20-24-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker <br>25-29-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker    <br>30-34-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker <br>35-38-------Ring: Airplane Up, Left, Right, UpsideDown<br>39----------?<br>40----------Ring: just a ring<br>41----------?<br>42-44-------Cylinder w/ number (uses 'reserved' parameter)<br>45-47-------Cylinder no arrow or number<br><br>If using type 42-44, reserved sets number / number and shape to display<br><br>0-99------------Just numbers (0-99)<br>100-109-----------------Arrow (0-9)<br>110-119------------Two arrows (0-9)<br>120-129----------Three arrows (0-9)<br>130-139----------------Circle (0-9)<br>140-149------------CycleArrow (0-9)<br>150-159----------------Circle (0-9)<br>160-169----Circle  w/ pointer (0-9)<br>170-179-------Perforated ring (0-9)<br>180-189----------------Sphere (0-9)
Creates a checkpoint. Returns the handle of the checkpoint.<br><br>Parameters:<br>* type - The type of checkpoint to create. See below for a list of checkpoint types.<br>* pos1 - The position of the checkpoint.<br>* pos2 - The position of the next checkpoint to point to.<br>* radius - The radius of the checkpoint.<br>* color - The color of the checkpoint.<br>* reserved - Special parameter, see below for details. Usually set to 0 in the scripts.<br><br>Checkpoint types:<br>0-4---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker<br>5-9---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker<br>10-14-------Ring: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker<br>15-19-------1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker      <br>20-24-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker <br>25-29-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker    <br>30-34-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker <br>35-38-------Ring: Airplane Up, Left, Right, UpsideDown<br>39----------?<br>40----------Ring: just a ring<br>41----------?<br>42-44-------Cylinder w/ number (uses 'reserved' parameter)<br>45-47-------Cylinder no arrow or number<br><br>If using type 42-44, reserved sets number / number and shape to display<br><br>0-99------------Just numbers (0-99)<br>100-109-----------------Arrow (0-9)<br>110-119------------Two arrows (0-9)<br>120-129----------Three arrows (0-9)<br>130-139----------------Circle (0-9)<br>140-149------------CycleArrow (0-9)<br>150-159----------------Circle (0-9)<br>160-169----Circle  w/ pointer (0-9)<br>170-179-------Perforated ring (0-9)<br>180-189----------------Sphere (0-9)
==Syntax==
==Syntax==
Line 30: Line 33:
{{Graphics_s_function_c}}
{{Graphics_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Revision as of 20:33, 1 October 2017

Rework required!

The contents of this page are possibly invalid or incomplete. Please treat the contents of this page with caution!

If you are able to, please modify the page so that it's factually correct.

Creates a checkpoint. Returns the handle of the checkpoint.

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)

Syntax

mp.game.graphics.createCheckpoint(type, posX1, posY1, posZ1, posX2, posY2, posZ2, radius, colorR, colorG, colorB, alpha, reserved);

Required Arguments

  • type: int
  • posX1: float
  • posY1: float
  • posZ1: float
  • posX2: float
  • posY2: float
  • posZ2: float
  • radius: float
  • colorR: int
  • colorG: int
  • colorB: int
  • alpha: int
  • reserved: int

Return value

  • int

Example

This example creates a ring checkpoint with white color.

mp.game.graphics.createCheckpoint(35, -115, -848, 36, -115, -848, 39, 1, 255, 255, 255, 150,0);
// Vector3 doesn't work

See also