Checkpoint::getColor: Difference between revisions
m (Mcfloy moved page Checkpoint::getColour to Checkpoint::getColor) |
No edit summary |
||
| Line 7: | Line 7: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
const checkpoint = mp.checkpoints.new(2, new mp.Vector3(10, 10, 72), new mp.Vector3(), 4, 150, 255, 255, 255, true); | const checkpoint = mp.checkpoints.new(2, new mp.Vector3(10, 10, 72), new mp.Vector3(), 4, 150, 255, 255, 255, true); | ||
const | const color = checkpoint.getColor(); | ||
console.log( | console.log(color); // -> [150, 255, 255, 255] | ||
console.log( | console.log(color[0]); // -> 150 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Checkpoint_function}} | {{Checkpoint_function}} | ||
Revision as of 12:55, 29 December 2017
Function: Returns an array of 4 numbers, with a checkpoint color
Return
- Array<Number>
Example
Server-Side
const checkpoint = mp.checkpoints.new(2, new mp.Vector3(10, 10, 72), new mp.Vector3(), 4, 150, 255, 255, 255, true);
const color = checkpoint.getColor();
console.log(color); // -> [150, 255, 255, 255]
console.log(color[0]); // -> 150