Entity::alpha: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Replaced HTML with template)
Line 7: Line 7:


== Example ==
== Example ==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
const alpha = player.alpha;
const alpha = player.alpha;
console.log(alpha) // return e.g. 255
console.log(alpha); // return e.g. 255
player.alpha = 0; // make the player transparent
player.alpha = 0; // make the player transparent
</syntaxhighlight>
</pre>
</div>
}}


==See Also==
==See Also==
{{Entity_definition}}
{{Entity_definition}}

Revision as of 11:48, 26 October 2018

This property using for setting or getting entity alpha.

Getter

  • Number

Setter

  • Number

Example

Server-Side
const alpha = player.alpha;
console.log(alpha); // return e.g. 255
player.alpha = 0; // make the player transparent

See Also