natives.drawColouredCylinder

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.drawColouredCylinder(Vec3 position, float radius, float height, int r, int g, int b, int a)

The natives.drawColouredCylinder function is used to Draws a coloured cylinder at the given coordinates for debugging or visual markers.

Parameters

1) Vec3 position Coordinates of the cylinder base (x, y, z).
2) float radius Radius of the cylinder.
3) float height Height of the cylinder.
4) int r Red component (0–255).
5) int g Green component (0–255).
6) int b Blue component (0–255).
7) int a Alpha component (0–255, transparency).

Return

void This function doesn't return a value.

Notes

  • - Must be called inside a rendering event such as OnDrawnHUD so the cylinder is drawn each frame- Useful for visualizing zones, areas of effect, or collision boundaries- Alpha controls transparency (0 = invisible, 255 = fully opaque).

Examples

Example 1 - JavaScript:

addEventHandler("OnDrawnHUD", () => {

natives.drawColouredCylinder(new Vec3(910.94, -506.06, 15.04), 2.0, 5.0, 255, 0, 0, 128);

});

Compatibility

There isn't any compatibility information for this function.