Blip::getColour: Difference between revisions

From RAGE Multiplayer Wiki
m (Replaced HTML with template)
No edit summary
 
Line 1: Line 1:
Property to return the colour value of the blip.
Function to return the colour value of the blip.


== Syntax ==
== Syntax ==
Line 7: Line 7:


=== Return Value ===
=== Return Value ===
*'''Number'''
* {{RageType|Number}}


== Examples ==
== Examples ==
Line 19: Line 19:


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"
</pre>
</pre>
}}
}}
Line 28: Line 27:
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:Blip API]]
[[Category:Blip API]]
[[Category:Client-side Function]]

Latest revision as of 08:23, 6 May 2019

Function 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