Checkpoint::setColor: Difference between revisions

From RAGE Multiplayer Wiki
m (category)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Sets the checkpoint color
Sets the checkpoint color
==Parameters==
==Parameters==
* '''r: <span style="color:#008017>Number</span>'''
* '''r:''' {{RageType|Number}} Red color value (0 to 255)
* '''g: <span style="color:#008017>Number</span>'''
* '''g:''' {{RageType|Number}} Green color value (0 to 255)
* '''b: <span style="color:#008017>Number</span>'''
* '''b:''' {{RageType|Number}} Blue color value (0 to 255)
* '''a: <span style="color:#008017>Number</span>'''
* '''a:''' {{RageType|Number}} Alpha color value (0 to 255)


==Syntax==
==Syntax==
Line 13: Line 13:


==Example==
==Example==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<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 21: Line 20:


</syntaxhighlight>
</syntaxhighlight>
</div>
}}


==See Also==
==See also==
{{Checkpoint_functions}}
{{Checkpoint_functions}}
[[Category:Checkpoint API]]
[[Category:Server-side Function]]

Latest revision as of 16:49, 17 May 2019

Sets the checkpoint color

Parameters

  • r: Number Red color value (0 to 255)
  • g: Number Green color value (0 to 255)
  • b: Number Blue color value (0 to 255)
  • a: Number Alpha color value (0 to 255)

Syntax

Server-Side

checkpoint.setColour(r, g, b, a);

Example

Server-Side
const checkpoint = mp.checkpoints.new(2, new mp.Vector3(10, 10, 72), new mp.Vector3(), 4, 150, 255, 255, 255, true);

checkpoint.setColour(255, 0, 0, 255);

See also