Marker::getColour: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "{{Incomplete Functions}}")
 
(Creates the page from incomplete)
 
Line 1: Line 1:
{{Incomplete Functions}}
{{ServerSide}}
 
Retrieves the color of the selected marker
 
== Syntax ==
 
<syntaxhighlight lang="javascript">
marker.getColor();
</syntaxhighlight>
 
=== Returned Values ===
 
* '''colour''': {{RageType|[Int, Int, Int, Int]}}
 
== Example ==
 
Retrieves the color of the marker and outputs the result in the console.
 
<syntaxhighlight lang="javascript">
let testMarker = mp.markers.new(1, new mp.Vector3(-441.88, 1156.86, 325), 2.0, {
    color: [255, 255, 0, 255]
});
 
let col = testMarker.getColor();
console.log("Colour: " + col)
</syntaxhighlight>

Latest revision as of 09:52, 14 May 2018

Server-Side

Retrieves the color of the selected marker

Syntax

marker.getColor();

Returned Values

  • colour: [Int, Int, Int, Int]

Example

Retrieves the color of the marker and outputs the result in the console.

let testMarker = mp.markers.new(1, new mp.Vector3(-441.88, 1156.86, 325), 2.0, {
    color: [255, 255, 0, 255]
});

let col = testMarker.getColor();
console.log("Colour: " + col)