Difference between revisions of "Checkpoint::Checkpoint"

From RAGE Multiplayer Wiki
Jump to navigation Jump to search
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{SharedFunctionJS}}
 
{{SharedFunctionJS}}
  
'''Function''': Creates a Checkpoint.
+
Creates a Checkpoint.
 +
 
 +
{{JSContainer|
 +
 
 
==Parameters==
 
==Parameters==
 
*'''type''': {{RageType|Number}}  
 
*'''type''': {{RageType|Number}}  
Line 9: Line 12:
 
**'''direction''': {{RageType|Vector3}}
 
**'''direction''': {{RageType|Vector3}}
 
**'''color''': {{RageType|number[4]}}
 
**'''color''': {{RageType|number[4]}}
***'''red''': {{RageType|number}} Between 0 and 255
+
***'''red''': {{RageType|number}} (0-255)
***'''green''': {{RageType|number}} Between 0 and 255
+
***'''green''': {{RageType|number}} (0-255)
***'''blue''': {{RageType|number}} Between 0 and 255
+
***'''blue''': {{RageType|number}} (0-255)
***'''alpha''': {{RageType|number}} Between 0 and 255
+
***'''alpha''': {{RageType|number}} (0-255)
 
**'''visible''': {{RageType|Boolean}}
 
**'''visible''': {{RageType|Boolean}}
 
**'''dimension''': {{RageType|Number}}  
 
**'''dimension''': {{RageType|Number}}  
Line 18: Line 21:
 
==Example==
 
==Example==
  
<syntaxhighlight lang="javascript">
+
<pre>
 
mp.checkpoints.new(1, new mp.Vector3(0, 0, 75), 10,
 
mp.checkpoints.new(1, new mp.Vector3(0, 0, 75), 10,
 
{
 
{
Line 26: Line 29:
 
     dimension: 0
 
     dimension: 0
 
});
 
});
</syntaxhighlight>
+
</pre>
 +
}}
  
 
==See Also==
 
==See Also==

Latest revision as of 11:34, 3 December 2019

Js.png JavaScript


Creates a Checkpoint.

JavaScript Syntax
Jslogo.png


Parameters

  • type: Number
  • position: Vector3
  • radius: Number
  • Mandatory parameters: object:
    • direction: Vector3
    • color: number[4]
      • red: number (0-255)
      • green: number (0-255)
      • blue: number (0-255)
      • alpha: number (0-255)
    • visible: Boolean
    • dimension: Number

Example

mp.checkpoints.new(1, new mp.Vector3(0, 0, 75), 10,
{
    direction: new mp.Vector3(0, 0, 75),
    color: [ 255, 255, 255, 255 ],
    visible: true,
    dimension: 0
});


See Also