Checkpoint::getColor: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Returns an array of 4 numbers, with a checkpoint color ==Return== * '''<span style="color:#008017>Array<Number></span>''' ==Example== <div class="header" style="background-c...")
 
m (Adding the ServerSide header template)
Line 4: Line 4:


==Example==
==Example==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServerSide}}
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<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);
Line 13: Line 12:
console.log(colour[0]); // -> 150
console.log(colour[0]); // -> 150
</syntaxhighlight>
</syntaxhighlight>
</div>


==See Also==
==See Also==
{{Checkpoint_function}}
{{Checkpoint_function}}

Revision as of 15:21, 27 December 2017

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 colour = checkpoint.getColour();

console.log(colour); // -> [150, 255, 255, 255]
console.log(colour[0]); // -> 150

See Also