natives.drawRect

Revision as of 07:47, 24 November 2025 by ChrisGame20 (talk | contribs) (Created page with "{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.drawRect |parameters = Vec2 position, Vec2 size, int r, int g, int b, int a |parameter1 = Vec2 position Normalized screen coordinates (0.0–1.0) for the rectangle’s center |parameter2 = Vec2 size Rectangle size relative to screen (width, height) |parameter3 = int r Red color value (0–255) |parameter4 = int g Green color value (0–255) |parameter5 = int b Blue color value (0–255) |paramet...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

natives.drawRect

Signature: void natives.drawRect(Vec2 position, Vec2 size, int r, int g, int b, int a)

Usage: Draws a rectangle on the screen with the specified position, size, and color

Parameters

Vec2 position Normalized screen coordinates (0.0–1.0) for the rectangle’s center
Vec2 size Rectangle size relative to screen (width, height)
int r Red color value (0–255)
int g Green color value (0–255)
int b Blue color value (0–255)
int a Alpha transparency value (0–255)

Return

void

On failure: void