Checkpoint::setColor: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
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==
{{ServerSide}}
{{ServersideCode|
<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 20: Line 20:


</syntaxhighlight>
</syntaxhighlight>
}}


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

Revision as of 11:22, 30 April 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