natives.DRAW_CORONA

From GTA Connected
Jump to navigation Jump to search

Function Client Only icon-vc.png Online and Offline

Available since Client 1.0.0

void natives.DRAW_CORONA(Vec3 position, float radius, int type, int flare, int r, int g, int a)

The natives.DRAW_CORONA function is used to Draw a corona (light halo) at a specific world position in Vice City, with optional lensflare.

Parameters

1) Vec3 position World coordinates where the corona is drawn (x, y, z).
2) float radius Corona radius/size (1.0 , 1.5 , 2.0).
3) int type Corona style (available 0–8).
4) int flare Lensflare option (0 = none, 1 = yellow, 2 = white).
5) int r Red component (0–255).
6) int g Green component (0–255).
7) int a Alpha (0–255; 0 invisible, 255 fully visible).

Return

void This function doesn't return a value.

Notes

  • Type selects the corona style (0–8). Flare is independent and supports three values: none, yellow, white. Color is defined by R and G only in this implementation; use alpha to control opacity.

Examples

Example 1 - JavaScript:

addEventHandler("OnDrawnHUD", function() {

   // Corona: position, radius, type, flare, R, G, A (7 params)
   natives.DRAW_CORONA(new Vec3(-592.0, 670.0, 11.0), 2.0, 2, 0, 0, 190, 100);   // type=2, flare=none, cyan-ish via R/G, semi-transparent
   natives.DRAW_CORONA(new Vec3(-600.0, 675.0, 11.0), 1.5, 3, 1, 255, 255, 200); // type=3, flare=yellow
   natives.DRAW_CORONA(new Vec3(-605.0, 665.0, 11.0), 1.0, 5, 2, 255, 128, 255); // type=5, flare=white

});

Compatibility

There isn't any compatibility information for this function.