Blip::getColour: Difference between revisions

From RAGE Multiplayer Wiki
mNo edit summary
m (Replaced HTML with template)
Line 2: Line 2:


== Syntax ==
== Syntax ==
 
<pre>
<syntaxhighlight lang="javascript">
blip.getColour();
blip.getColour();
</syntaxhighlight>
</pre>


=== Return Value ===
=== Return Value ===
Line 12: Line 11:
== Examples ==
== Examples ==
Retrieving the colour value from the blip called policeBlip
Retrieving the colour value from the blip called policeBlip
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
{{ClientsideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), {
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0),
     color: 3,
     {
    shortRange: true,
        color: 3,
        shortRange: true,
});
});


let getBlipColour = policeBlip.getColour();
let getBlipColour = policeBlip.getColour();
mp.gui.chat.push("Colour: " + getBlipColour);
mp.gui.chat.push("Colour: " + getBlipColour);
//Output: "Colour: 3"
//Output: "Colour: 3"
</syntaxhighlight>
</pre>
</div>
}}


==See also==
==See also==

Revision as of 13:13, 26 October 2018

Property to return the colour value of the blip.

Syntax

blip.getColour();

Return Value

  • Number

Examples

Retrieving the colour value from the blip called policeBlip

Client-Side
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), {
    color: 3,
    shortRange: true,
});

let getBlipColour = policeBlip.getColour();
mp.gui.chat.push("Colour: " + getBlipColour);
//Output: "Colour: 3"

See also