Entity::alpha: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This property using for setting or getting entity alpha. == Example == <syntaxhighlight lang="javascript"> let alpha = player.alpha; player.alpha = 0; // make the player trans...")
 
mNo edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This property using for setting or getting entity alpha.
This property using for setting or getting entity alpha.
==Getter==
* {{RageType|Number}}
==Setter==
* {{RageType|Number}}
== Example ==
== Example ==
<syntaxhighlight lang="javascript">
{{ServersideCode|
let alpha = player.alpha;
<pre>
const alpha = player.alpha;
console.log(alpha); // return e.g. 255
player.alpha = 0; // make the player transparent
player.alpha = 0; // make the player transparent
</syntaxhighlight>
</pre>
}}
 
==See also==
{{Entity_definition}}


==See Also==
[[Category:Entity API]]
{{Entity_block}}
[[Category:Server-side Property]]

Latest revision as of 10:24, 30 April 2019

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