| Property | Value |
|---|---|
| Native Name | SET_ENTITY_ALPHA |
| Hash | 0x44A0870B7E92D7C0 |
| Return Type | void |
| Parameters | entity (Entity), alphaLevel (int), skin (BOOL) |
Description: This native sets the entity's alpha level.
Parameters
entity(Entity) — The entity to change the alpha for.alphaLevel(int) — The alpha level ranges from 0 to 255, but changes occur every 20% (every 51).skin(BOOL) — Whether or not to change the alpha of the entity's skin.
Examples
SetEntityAlpha(PlayerPedId(), 51, false)
SetEntityAlpha(PlayerPedId(), 51, false);
using static CitizenFX.Core.Native.API;
// ...
SetEntityAlpha(PlayerPedId(), 51, 0);
// or the preferred use of C# wrapper
Game.PlayerPed.Opacity = 51;