Blip::getAlpha: Difference between revisions
MrPancakers (talk | contribs) (Added example & changed layout) |
No edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Function to return the alpha value of the blip. | |||
== Syntax == | == Syntax == | ||
<pre> | |||
< | |||
blip.getAlpha(); | blip.getAlpha(); | ||
</ | </pre> | ||
=== Return Value === | === Return Value === | ||
* | * {{RageType|Number}} | ||
== Examples == | == Examples == | ||
Retrieving the alpha value from the blip called policeBlip | Retrieving the alpha value from the blip called policeBlip | ||
< | {{ClientsideCode| | ||
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), | <pre> | ||
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), { | |||
color: 3, | |||
alpha: 50, | |||
shortRange: true, | |||
}); | }); | ||
let getBlipAlpha = policeBlip.getAlpha(); | let getBlipAlpha = policeBlip.getAlpha(); | ||
mp.gui.chat.push("Alpha:" + getBlipAlpha); //Output: Alpha: 50" | |||
mp.gui.chat.push("Alpha:" + getBlipAlpha); | </pre> | ||
//Output: Alpha: 50" | }} | ||
</ | |||
== See Also == | == See Also == | ||
| Line 34: | Line 29: | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
[[Category:Blip API]] | [[Category:Blip API]] | ||
[[Category:Client-side Function]] | |||
Latest revision as of 08:19, 6 May 2019
Function to return the alpha value of the blip.
Syntax
blip.getAlpha();
Return Value
- Number
Examples
Retrieving the alpha value from the blip called policeBlip
Client-Side
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), {
color: 3,
alpha: 50,
shortRange: true,
});
let getBlipAlpha = policeBlip.getAlpha();
mp.gui.chat.push("Alpha:" + getBlipAlpha); //Output: Alpha: 50"
See Also
- Functions
- Properties