Blip::getColour: Difference between revisions
No edit summary |
MrPancakers (talk | contribs) (Added example & changed layout) |
||
| Line 1: | Line 1: | ||
{{ClientSide}} | |||
Property to return the colour value of the blip. | |||
== Syntax == | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
blip.getColour(); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Return Value === | |||
*'''Number''' | |||
== Examples == | |||
Retrieving the colour value from the blip called policeBlip | |||
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;"> | |||
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div> | |||
<syntaxhighlight lang="javascript"> | |||
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" | |||
</syntaxhighlight> | |||
</div> | |||
==See also== | ==See also== | ||
{{ | {{Blip_definition}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
[[Category:Blip API]] | [[Category:Blip API]] | ||
Revision as of 11:06, 11 May 2018
Client-Side
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
- Functions
- Properties