Skip to content

CreateUiRect

A filled rectangle.

CreateUiRect(name, x, y, w, h [, color, alpha, parent])
Parameter Type
name string the element’s name
x number the left edge
y number the top edge
w number the width
h number the height
color number 0xRRGGBB (black) (optional)
alpha number 0 .. 100 (100) (optional)
parent string a clip’s name (optional)

string - the name

CreateUiRect("bar_bg", 40, 400, 200, 12, 0x000000, 60)
CreateUiRect("bar", 40, 400, 200, 12, 0xB8302A)
SetUiSize("bar", 200 * health / maxHealth, 12)

SetUiSize · SetUiColor · the The game’s UI for a script group of the index